home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-10-03 | 17.1 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Oct 3 13:34:01 1995, modified Tue Oct 3 13:34:01 1995, creator Think C, type ASCII, 16857 bytes "QTMADevelop95.c" , at 0x4259 460 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 51 54 4d 41 44 65 | 76 65 6c 6f 70 39 35 2e |..QTMADe|velop95.|
|00000010| 63 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |c.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 41 d9 00 | 00 01 cc ac 97 24 89 ac |.....A..|.....$..|
|00000060| 97 24 89 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.$......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 65 e4 00 00 |........|....e...|
|00000080| 09 20 0d 2f 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |. ./*---|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|000000a0| 09 49 6e 63 6c 75 73 69 | 6f 6e 73 0d 2d 2d 2d 2d |.Inclusi|ons.----|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2a 2f | 0d 0d 23 69 6e 63 6c 75 |------*/|..#inclu|
|000000d0| 64 65 20 3c 51 75 69 63 | 6b 44 72 61 77 2e 68 3e |de <Quic|kDraw.h>|
|000000e0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 57 69 6e 64 6f |.#includ|e <Windo|
|000000f0| 77 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ws.h>.#i|nclude <|
|00000100| 53 74 61 6e 64 61 72 64 | 46 69 6c 65 2e 68 3e 0d |Standard|File.h>.|
|00000110| 23 69 6e 63 6c 75 64 65 | 20 3c 4f 53 55 74 69 6c |#include| <OSUtil|
|00000120| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 53 |s.h>.#in|clude <S|
|00000130| 63 72 69 70 74 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |cript.h>|.#includ|
|00000140| 65 20 3c 51 75 69 63 6b | 54 69 6d 65 43 6f 6d 70 |e <Quick|TimeComp|
|00000150| 6f 6e 65 6e 74 73 2e 68 | 3e 0d 0d 23 69 6e 63 6c |onents.h|>..#incl|
|00000160| 75 64 65 20 22 42 69 67 | 45 61 73 79 32 2e 68 22 |ude "Big|Easy2.h"|
|00000170| 0d 0d 2f 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |../*----|--------|
|00000180| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0d 09 |--------|------..|
|00000190| 4c 69 6d 69 74 73 20 61 | 6e 64 20 4b 6f 6e 73 74 |Limits a|nd Konst|
|000001a0| 61 6e 74 73 0d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ants.---|--------|
|000001b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|000001c0| 2f 0d 65 6e 75 6d 0d 09 | 7b 0d 09 6d 4f 70 65 6e |/.enum..|{..mOpen|
|000001d0| 20 3d 20 31 30 30 2c 0d | 09 6d 43 6c 6f 73 65 0d | = 100,.|.mClose.|
|000001e0| 09 7d 3b 0d 0d 74 79 70 | 65 64 65 66 20 73 74 72 |.};..typ|edef str|
|000001f0| 75 63 74 0d 09 7b 0d 09 | 57 69 6e 64 6f 77 50 74 |uct..{..|WindowPt|
|00000200| 72 20 77 3b 0d 09 7d 20 | 47 6c 6f 62 61 6c 73 3b |r w;..} |Globals;|
|00000210| 0d 0d 73 74 61 74 69 63 | 20 47 6c 6f 62 61 6c 73 |..static| Globals|
|00000220| 20 67 3b 0d 0d 0d 2f 2a | 2d 2d 2d 2d 2d 2d 2d 2d | g;.../*|--------|
|00000230| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000240| 2d 2d 0d 09 50 72 6f 74 | 6f 74 79 70 65 73 0d 2d |--..Prot|otypes.-|
|00000250| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000260| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2f 0d 73 74 61 74 |--------|-*/.stat|
|00000270| 69 63 20 76 6f 69 64 20 | 47 6f 41 77 61 79 44 6f |ic void |GoAwayDo|
|00000280| 63 28 73 68 6f 72 74 20 | 6e 29 3b 0d 73 74 61 74 |c(short |n);.stat|
|00000290| 69 63 20 76 6f 69 64 20 | 4c 65 74 73 51 75 69 74 |ic void |LetsQuit|
|000002a0| 28 73 68 6f 72 74 20 6e | 2c 73 68 6f 72 74 20 6d |(short n|,short m|
|000002b0| 65 6e 75 49 74 65 6d 2c | 73 68 6f 72 74 20 6d 65 |enuItem,|short me|
|000002c0| 6e 75 52 65 66 29 3b 0d | 73 74 61 74 69 63 20 76 |nuRef);.|static v|
|000002d0| 6f 69 64 20 4f 70 65 6e | 57 69 6e 64 6f 77 28 73 |oid Open|Window(s|
|000002e0| 68 6f 72 74 20 6e 2c 73 | 68 6f 72 74 20 6d 65 6e |hort n,s|hort men|
|000002f0| 75 49 74 65 6d 2c 73 68 | 6f 72 74 20 6d 65 6e 75 |uItem,sh|ort menu|
|00000300| 52 65 66 29 3b 0d 73 74 | 61 74 69 63 20 76 6f 69 |Ref);.st|atic voi|
|00000310| 64 20 49 6e 69 74 56 61 | 72 73 28 76 6f 69 64 29 |d InitVa|rs(void)|
|00000320| 3b 0d 0d 73 74 61 74 69 | 63 20 76 6f 69 64 20 53 |;..stati|c void S|
|00000330| 44 72 61 77 44 6f 63 28 | 73 68 6f 72 74 20 6e 29 |DrawDoc(|short n)|
|00000340| 3b 0d 73 74 61 74 69 63 | 20 76 6f 69 64 20 53 43 |;.static| void SC|
|00000350| 6c 69 63 6b 44 6f 63 28 | 73 68 6f 72 74 20 6e 2c |lickDoc(|short n,|
|00000360| 50 6f 69 6e 74 20 70 2c | 73 68 6f 72 74 20 6d 6f |Point p,|short mo|
|00000370| 64 73 29 3b 0d 73 74 61 | 74 69 63 20 76 6f 69 64 |ds);.sta|tic void|
|00000380| 20 53 4b 65 79 44 6f 63 | 28 73 68 6f 72 74 20 6e | SKeyDoc|(short n|
|00000390| 2c 73 68 6f 72 74 20 6b | 65 79 2c 73 68 6f 72 74 |,short k|ey,short|
|000003a0| 20 63 6f 64 65 2c 73 68 | 6f 72 74 20 6d 6f 64 73 | code,sh|ort mods|
|000003b0| 29 3b 0d 73 74 61 74 69 | 63 20 76 6f 69 64 20 53 |);.stati|c void S|
|000003c0| 49 64 6c 65 44 6f 63 28 | 73 68 6f 72 74 20 6e 2c |IdleDoc(|short n,|
|000003d0| 20 42 6f 6f 6c 65 61 6e | 20 66 72 6f 6e 74 29 3b | Boolean| front);|
|000003e0| 0d 0d 76 6f 69 64 20 41 | 63 74 69 76 61 74 65 44 |..void A|ctivateD|
|000003f0| 6f 63 28 73 68 6f 72 74 | 20 6e 29 3b 0d 76 6f 69 |oc(short| n);.voi|
|00000400| 64 20 44 65 61 63 74 69 | 76 61 74 65 44 6f 63 28 |d Deacti|vateDoc(|
|00000410| 73 68 6f 72 74 20 6e 29 | 3b 0d 0d 0d 2f 2a 2d 2d |short n)|;.../*--|
|00000420| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000430| 2d 2d 2d 2d 2d 2d 2d 2d | 0d 09 43 6f 6d 70 75 74 |--------|..Comput|
|00000440| 65 72 20 50 72 6f 67 72 | 61 6d 73 0d 2d 2d 2d 2d |er Progr|ams.----|
|00000450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000460| 2d 2d 2d 2d 2d 2d 2a 2f | 0d 0d 0d 0d 0d 76 6f 69 |------*/|.....voi|
|00000470| 64 20 50 6c 61 79 53 6f | 6d 65 4e 6f 74 65 73 28 |d PlaySo|meNotes(|
|00000480| 73 68 6f 72 74 20 61 2c | 73 68 6f 72 74 20 62 2c |short a,|short b,|
|00000490| 73 68 6f 72 74 20 63 29 | 3b 0d 76 6f 69 64 20 50 |short c)|;.void P|
|000004a0| 69 63 6b 54 68 65 6e 50 | 6c 61 79 53 6f 6d 65 4e |ickThenP|laySomeN|
|000004b0| 6f 74 65 73 28 73 68 6f | 72 74 20 78 78 31 2c 73 |otes(sho|rt xx1,s|
|000004c0| 68 6f 72 74 20 78 78 32 | 2c 73 68 6f 72 74 20 78 |hort xx2|,short x|
|000004d0| 78 33 29 3b 0d 76 6f 69 | 64 20 50 6c 61 79 53 6f |x3);.voi|d PlaySo|
|000004e0| 6d 65 42 65 6e 74 4e 6f | 74 65 73 28 73 68 6f 72 |meBentNo|tes(shor|
|000004f0| 74 20 78 78 31 2c 73 68 | 6f 72 74 20 78 78 32 2c |t xx1,sh|ort xx2,|
|00000500| 73 68 6f 72 74 20 78 78 | 33 29 3b 0d 75 6e 73 69 |short xx|3);.unsi|
|00000510| 67 6e 65 64 20 6c 6f 6e | 67 20 2a 42 75 69 6c 64 |gned lon|g *Build|
|00000520| 54 75 6e 65 48 65 61 64 | 65 72 28 6c 6f 6e 67 20 |TuneHead|er(long |
|00000530| 2a 6c 6f 6e 67 43 6f 75 | 6e 74 29 3b 0d 48 61 6e |*longCou|nt);.Han|
|00000540| 64 6c 65 20 42 75 69 6c | 64 54 75 6e 65 53 65 71 |dle Buil|dTuneSeq|
|00000550| 75 65 6e 63 65 28 6c 6f | 6e 67 20 2a 64 75 72 61 |uence(lo|ng *dura|
|00000560| 74 69 6f 6e 29 3b 0d 76 | 6f 69 64 20 42 75 69 6c |tion);.v|oid Buil|
|00000570| 64 53 65 71 75 65 6e 63 | 65 41 6e 64 50 6c 61 79 |dSequenc|eAndPlay|
|00000580| 28 73 68 6f 72 74 20 78 | 78 31 2c 73 68 6f 72 74 |(short x|x1,short|
|00000590| 20 78 78 32 2c 73 68 6f | 72 74 20 78 78 33 29 3b | xx2,sho|rt xx3);|
|000005a0| 0d 76 6f 69 64 20 42 75 | 69 6c 64 4d 75 73 69 63 |.void Bu|ildMusic|
|000005b0| 4d 6f 76 69 65 28 73 68 | 6f 72 74 20 78 78 31 2c |Movie(sh|ort xx1,|
|000005c0| 73 68 6f 72 74 20 78 78 | 32 2c 73 68 6f 72 74 20 |short xx|2,short |
|000005d0| 78 78 33 29 3b 0d 76 6f | 69 64 20 55 73 65 4d 49 |xx3);.vo|id UseMI|
|000005e0| 44 49 49 6e 70 75 74 28 | 73 68 6f 72 74 20 78 78 |DIInput(|short xx|
|000005f0| 31 2c 73 68 6f 72 74 20 | 78 78 32 2c 73 68 6f 72 |1,short |xx2,shor|
|00000600| 74 20 78 78 33 29 3b 0d | 0d 0d 76 6f 69 64 20 50 |t xx3);.|..void P|
|00000610| 6c 61 79 53 6f 6d 65 4e | 6f 74 65 73 28 73 68 6f |laySomeN|otes(sho|
|00000620| 72 74 20 78 78 31 2c 73 | 68 6f 72 74 20 78 78 32 |rt xx1,s|hort xx2|
|00000630| 2c 73 68 6f 72 74 20 78 | 78 33 29 09 2f 2a 20 64 |,short x|x3)./* d|
|00000640| 75 6d 6d 79 20 61 72 67 | 75 6d 65 6e 74 73 20 66 |ummy arg|uments f|
|00000650| 6f 72 20 62 69 67 20 65 | 61 73 79 20 73 68 65 6c |or big e|asy shel|
|00000660| 6c 20 2a 2f 0d 09 7b 0d | 09 4e 6f 74 65 41 6c 6c |l */..{.|.NoteAll|
|00000670| 6f 63 61 74 6f 72 20 6e | 61 3b 0d 09 4e 6f 74 65 |ocator n|a;..Note|
|00000680| 43 68 61 6e 6e 65 6c 20 | 6e 63 3b 0d 09 4e 6f 74 |Channel |nc;..Not|
|00000690| 65 52 65 71 75 65 73 74 | 20 6e 72 3b 0d 09 43 6f |eRequest| nr;..Co|
|000006a0| 6d 70 6f 6e 65 6e 74 52 | 65 73 75 6c 74 20 74 68 |mponentR|esult th|
|000006b0| 69 73 45 72 72 6f 72 3b | 0d 09 6c 6f 6e 67 20 74 |isError;|..long t|
|000006c0| 2c 69 3b 0d 0d 09 6e 61 | 20 3d 20 30 3b 0d 09 6e |,i;...na| = 0;..n|
|000006d0| 63 20 3d 20 30 3b 0d 0d | 09 2f 2a 0d 09 20 2a 20 |c = 0;..|./*.. * |
|000006e0| 4f 70 65 6e 20 75 70 20 | 74 68 65 20 4e 6f 74 65 |Open up |the Note|
|000006f0| 20 41 6c 6c 6f 63 61 74 | 6f 72 0d 09 20 2a 2f 0d | Allocat|or.. */.|
|00000700| 09 6e 61 20 3d 20 4f 70 | 65 6e 44 65 66 61 75 6c |.na = Op|enDefaul|
|00000710| 74 43 6f 6d 70 6f 6e 65 | 6e 74 28 27 6e 6f 74 61 |tCompone|nt('nota|
|00000720| 27 2c 30 29 3b 0d 09 69 | 66 28 21 6e 61 29 0d 09 |',0);..i|f(!na)..|
|00000730| 09 67 6f 74 6f 20 67 6f | 48 6f 6d 65 3b 0d 0d 09 |.goto go|Home;...|
|00000740| 2f 2a 0d 09 20 2a 20 46 | 69 6c 6c 20 6f 75 74 20 |/*.. * F|ill out |
|00000750| 61 20 4e 6f 74 65 20 52 | 65 71 75 65 73 74 20 75 |a Note R|equest u|
|00000760| 73 69 6e 67 20 4e 41 53 | 74 75 66 66 54 6f 6e 65 |sing NAS|tuffTone|
|00000770| 44 65 73 63 72 69 70 74 | 69 6f 6e 0d 09 20 2a 20 |Descript|ion.. * |
|00000780| 74 6f 20 68 65 6c 70 2c | 20 61 6e 64 20 61 6c 6c |to help,| and all|
|00000790| 6f 63 61 74 65 20 61 20 | 4e 6f 74 65 20 43 68 61 |ocate a |Note Cha|
|000007a0| 6e 6e 65 6c 0d 09 20 2a | 2f 0d 09 6e 72 2e 70 6f |nnel.. *|/..nr.po|
|000007b0| 6c 79 70 68 6f 6e 79 20 | 3d 20 32 3b 09 09 2f 2a |lyphony |= 2;../*|
|000007c0| 20 73 69 6d 75 6c 74 61 | 6e 65 6f 75 73 20 74 6f | simulta|neous to|
|000007d0| 6e 65 73 20 2a 2f 0d 09 | 6e 72 2e 74 79 70 69 63 |nes */..|nr.typic|
|000007e0| 61 6c 50 6f 6c 79 70 68 | 6f 6e 79 20 3d 20 30 78 |alPolyph|ony = 0x|
|000007f0| 30 30 30 31 30 30 30 30 | 3b 0d 09 74 68 69 73 45 |00010000|;..thisE|
|00000800| 72 72 6f 72 20 3d 20 4e | 41 53 74 75 66 66 54 6f |rror = N|AStuffTo|
|00000810| 6e 65 44 65 73 63 72 69 | 70 74 69 6f 6e 28 6e 61 |neDescri|ption(na|
|00000820| 2c 31 2c 26 6e 72 2e 74 | 6f 6e 65 29 3b 09 2f 2a |,1,&nr.t|one);./*|
|00000830| 20 31 20 69 73 20 50 69 | 61 6e 6f 20 2a 2f 0d 0d | 1 is Pi|ano */..|
|00000840| 09 74 68 69 73 45 72 72 | 6f 72 20 3d 20 4e 41 4e |.thisErr|or = NAN|
|00000850| 65 77 4e 6f 74 65 43 68 | 61 6e 6e 65 6c 28 6e 61 |ewNoteCh|annel(na|
|00000860| 2c 26 6e 72 2c 26 6e 63 | 29 3b 0d 09 69 66 28 74 |,&nr,&nc|);..if(t|
|00000870| 68 69 73 45 72 72 6f 72 | 20 7c 7c 20 21 6e 63 29 |hisError| || !nc)|
|00000880| 0d 09 09 67 6f 74 6f 20 | 67 6f 48 6f 6d 65 3b 0d |...goto |goHome;.|
|00000890| 0d 09 2f 2a 0d 09 20 2a | 20 49 66 20 77 65 27 76 |../*.. *| If we'v|
|000008a0| 65 20 67 6f 74 74 65 6e | 20 74 68 69 73 20 66 61 |e gotten| this fa|
|000008b0| 72 2c 20 74 68 65 6e 20 | 74 68 69 6e 67 73 20 61 |r, then |things a|
|000008c0| 72 65 20 6f 6b 0d 09 20 | 2a 20 74 6f 20 70 6c 61 |re ok.. |* to pla|
|000008d0| 79 20 73 6f 6d 65 20 6d | 75 73 69 63 61 6c 20 6e |y some m|usical n|
|000008e0| 6f 74 65 73 2e 20 4c 6f | 76 65 6c 79 2e 0d 09 20 |otes. Lo|vely... |
|000008f0| 2a 2f 0d 09 4e 41 50 6c | 61 79 4e 6f 74 65 28 6e |*/..NAPl|ayNote(n|
|00000900| 61 2c 6e 63 2c 36 30 2c | 38 30 29 3b 09 2f 2a 20 |a,nc,60,|80);./* |
|00000910| 6d 69 64 64 6c 65 20 43 | 20 61 74 20 76 65 6c 6f |middle C| at velo|
|00000920| 63 69 74 79 20 38 30 20 | 2a 2f 0d 09 44 65 6c 61 |city 80 |*/..Dela|
|00000930| 79 28 34 30 2c 26 74 29 | 3b 09 09 09 2f 2a 20 64 |y(40,&t)|;.../* d|
|00000940| 65 6c 61 79 20 32 2f 33 | 20 6f 66 20 61 20 73 65 |elay 2/3| of a se|
|00000950| 63 6f 6e 64 20 2a 2f 0d | 09 4e 41 50 6c 61 79 4e |cond */.|.NAPlayN|
|00000960| 6f 74 65 28 6e 61 2c 6e | 63 2c 36 30 2c 30 29 3b |ote(na,n|c,60,0);|
|00000970| 09 2f 2a 20 6d 69 64 64 | 6c 65 20 43 20 61 74 20 |./* midd|le C at |
|00000980| 76 65 6c 6f 63 69 74 79 | 20 30 3a 20 65 6e 64 20 |velocity| 0: end |
|00000990| 6e 6f 74 65 20 2a 2f 0d | 09 44 65 6c 61 79 28 34 |note */.|.Delay(4|
|000009a0| 30 2c 26 74 29 3b 09 09 | 09 2f 2a 20 64 65 6c 61 |0,&t);..|./* dela|
|000009b0| 79 20 32 2f 33 20 6f 66 | 20 61 20 73 65 63 6f 6e |y 2/3 of| a secon|
|000009c0| 64 20 2a 2f 0d 0d 09 2f | 2a 0d 09 20 2a 20 4f 62 |d */.../|*.. * Ob|
|000009d0| 6c 69 67 61 74 6f 72 79 | 20 64 6f 2d 6c 6f 6f 70 |ligatory| do-loop|
|000009e0| 20 6f 66 20 72 69 73 69 | 6e 67 20 74 6f 6e 65 73 | of risi|ng tones|
|000009f0| 0d 09 20 2a 2f 0d 09 66 | 6f 72 28 69 20 3d 20 36 |.. */..f|or(i = 6|
|00000a00| 30 3b 20 69 20 3c 3d 20 | 38 34 3b 20 69 2b 2b 29 |0; i <= |84; i++)|
|00000a10| 0d 09 09 7b 0d 09 09 4e | 41 50 6c 61 79 4e 6f 74 |...{...N|APlayNot|
|00000a20| 65 28 6e 61 2c 6e 63 2c | 69 2c 38 30 29 3b 09 2f |e(na,nc,|i,80);./|
|00000a30| 2a 20 70 69 74 63 68 20 | 69 20 61 74 20 76 65 6c |* pitch |i at vel|
|00000a40| 6f 63 69 74 79 20 38 30 | 20 2a 2f 0d 09 09 4e 41 |ocity 80| */...NA|
|00000a50| 50 6c 61 79 4e 6f 74 65 | 28 6e 61 2c 6e 63 2c 69 |PlayNote|(na,nc,i|
|00000a60| 2b 37 2c 38 30 29 3b 09 | 2f 2a 20 70 69 74 63 68 |+7,80);.|/* pitch|
|00000a70| 20 69 2b 37 20 28 6d 75 | 73 69 63 61 6c 20 66 69 | i+7 (mu|sical fi|
|00000a80| 66 74 68 29 20 61 74 20 | 76 65 6c 6f 63 69 74 79 |fth) at |velocity|
|00000a90| 20 38 30 20 2a 2f 0d 09 | 09 44 65 6c 61 79 28 31 | 80 */..|.Delay(1|
|00000aa0| 30 2c 26 74 29 3b 09 09 | 09 2f 2a 20 64 65 6c 61 |0,&t);..|./* dela|
|00000ab0| 79 20 31 2f 36 20 6f 66 | 20 61 20 73 65 63 6f 6e |y 1/6 of| a secon|
|00000ac0| 64 20 2a 2f 0d 09 09 4e | 41 50 6c 61 79 4e 6f 74 |d */...N|APlayNot|
|00000ad0| 65 28 6e 61 2c 6e 63 2c | 69 2c 30 29 3b 09 2f 2a |e(na,nc,|i,0);./*|
|00000ae0| 20 70 69 74 63 68 20 69 | 20 61 74 20 76 65 6c 6f | pitch i| at velo|
|00000af0| 63 69 74 79 20 30 3a 20 | 65 6e 64 20 6e 6f 74 65 |city 0: |end note|
|00000b00| 20 2a 2f 0d 09 09 4e 41 | 50 6c 61 79 4e 6f 74 65 | */...NA|PlayNote|
|00000b10| 28 6e 61 2c 6e 63 2c 69 | 2b 37 2c 30 29 3b 09 2f |(na,nc,i|+7,0);./|
|00000b20| 2a 20 70 69 74 63 68 20 | 69 2b 37 20 61 74 20 76 |* pitch |i+7 at v|
|00000b30| 65 6c 6f 63 69 74 79 20 | 30 3a 20 65 6e 64 20 6e |elocity |0: end n|
|00000b40| 6f 74 65 20 2a 2f 0d 09 | 09 7d 0d 67 6f 48 6f 6d |ote */..|.}.goHom|
|00000b50| 65 3a 0d 09 69 66 28 6e | 63 29 0d 09 09 4e 41 44 |e:..if(n|c)...NAD|
|00000b60| 69 73 70 6f 73 65 4e 6f | 74 65 43 68 61 6e 6e 65 |isposeNo|teChanne|
|00000b70| 6c 28 6e 61 2c 6e 63 29 | 3b 0d 09 69 66 28 6e 61 |l(na,nc)|;..if(na|
|00000b80| 29 0d 09 09 43 6c 6f 73 | 65 43 6f 6d 70 6f 6e 65 |)...Clos|eCompone|
|00000b90| 6e 74 28 6e 61 29 3b 0d | 09 7d 0d 0d 76 6f 69 64 |nt(na);.|.}..void|
|00000ba0| 20 50 6c 61 79 53 68 65 | 70 61 72 64 4d 65 6c 6f | PlayShe|pardMelo|
|00000bb0| 64 79 28 73 68 6f 72 74 | 20 78 78 31 2c 73 68 6f |dy(short| xx1,sho|
|00000bc0| 72 74 20 78 78 32 2c 73 | 68 6f 72 74 20 78 78 33 |rt xx2,s|hort xx3|
|00000bd0| 29 09 2f 2a 20 64 75 6d | 6d 79 20 61 72 67 75 6d |)./* dum|my argum|
|00000be0| 65 6e 74 73 20 66 6f 72 | 20 62 69 67 20 65 61 73 |ents for| big eas|
|00000bf0| 79 20 73 68 65 6c 6c 20 | 2a 2f 3b 0d 76 6f 69 64 |y shell |*/;.void|
|00000c00| 20 50 6c 61 79 53 68 65 | 70 61 72 64 4d 65 6c 6f | PlayShe|pardMelo|
|00000c10| 64 79 28 73 68 6f 72 74 | 20 78 78 31 2c 73 68 6f |dy(short| xx1,sho|
|00000c20| 72 74 20 78 78 32 2c 73 | 68 6f 72 74 20 78 78 33 |rt xx2,s|hort xx3|
|00000c30| 29 09 2f 2a 20 64 75 6d | 6d 79 20 61 72 67 75 6d |)./* dum|my argum|
|00000c40| 65 6e 74 73 20 66 6f 72 | 20 62 69 67 20 65 61 73 |ents for| big eas|
|00000c50| 79 20 73 68 65 6c 6c 20 | 2a 2f 0d 09 7b 0d 09 4e |y shell |*/..{..N|
|00000c60| 6f 74 65 41 6c 6c 6f 63 | 61 74 6f 72 20 6e 61 3b |oteAlloc|ator na;|
|00000c70| 0d 09 4e 6f 74 65 43 68 | 61 6e 6e 65 6c 20 6e 63 |..NoteCh|annel nc|
|00000c80| 3b 0d 09 4e 6f 74 65 52 | 65 71 75 65 73 74 20 6e |;..NoteR|equest n|
|00000c90| 72 3b 0d 09 43 6f 6d 70 | 6f 6e 65 6e 74 52 65 73 |r;..Comp|onentRes|
|00000ca0| 75 6c 74 20 74 68 69 73 | 45 72 72 6f 72 3b 0d 09 |ult this|Error;..|
|00000cb0| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 69 2c |unsigned| long i,|
|00000cc0| 6a 2c 76 3b 0d 09 6c 6f | 6e 67 20 74 3b 0d 0d 09 |j,v;..lo|ng t;...|
|00000cd0| 6e 61 20 3d 20 30 3b 0d | 09 6e 63 20 3d 20 30 3b |na = 0;.|.nc = 0;|
|00000ce0| 0d 0d 09 2f 2a 0d 09 20 | 2a 20 4f 70 65 6e 20 75 |.../*.. |* Open u|
|00000cf0| 70 20 74 68 65 20 4e 6f | 74 65 20 41 6c 6c 6f 63 |p the No|te Alloc|
|00000d00| 61 74 6f 72 0d 09 20 2a | 2f 0d 09 6e 61 20 3d 20 |ator.. *|/..na = |
|00000d10| 4f 70 65 6e 44 65 66 61 | 75 6c 74 43 6f 6d 70 6f |OpenDefa|ultCompo|
|00000d20| 6e 65 6e 74 28 27 6e 6f | 74 61 27 2c 30 29 3b 0d |nent('no|ta',0);.|
|00000d30| 09 69 66 28 21 6e 61 29 | 0d 09 09 67 6f 74 6f 20 |.if(!na)|...goto |
|00000d40| 67 6f 48 6f 6d 65 3b 0d | 0d 09 2f 2a 0d 09 20 2a |goHome;.|../*.. *|
|00000d50| 20 46 69 6c 6c 20 6f 75 | 74 20 61 20 4e 6f 74 65 | Fill ou|t a Note|
|00000d60| 20 52 65 71 75 65 73 74 | 20 75 73 69 6e 67 20 4e | Request| using N|
|00000d70| 41 53 74 75 66 66 54 6f | 6e 65 44 65 73 63 72 69 |AStuffTo|neDescri|
|00000d80| 70 74 69 6f 6e 0d 09 20 | 2a 20 74 6f 20 68 65 6c |ption.. |* to hel|
|00000d90| 70 2c 20 61 6e 64 20 61 | 6c 6c 6f 63 61 74 65 20 |p, and a|llocate |
|00000da0| 61 20 4e 6f 74 65 20 43 | 68 61 6e 6e 65 6c 0d 09 |a Note C|hannel..|
|00000db0| 20 2a 2f 0d 09 6e 72 2e | 70 6f 6c 79 70 68 6f 6e | */..nr.|polyphon|
|00000dc0| 79 20 3d 20 33 3b 09 09 | 2f 2a 20 73 69 6d 75 6c |y = 3;..|/* simul|
|00000dd0| 74 61 6e 65 6f 75 73 20 | 74 6f 6e 65 73 20 2a 2f |taneous |tones */|
|00000de0| 0d 09 6e 72 2e 74 79 70 | 69 63 61 6c 50 6f 6c 79 |..nr.typ|icalPoly|
|00000df0| 70 68 6f 6e 79 20 3d 20 | 30 78 30 30 30 31 30 30 |phony = |0x000100|
|00000e00| 30 30 3b 0d 09 74 68 69 | 73 45 72 72 6f 72 20 3d |00;..thi|sError =|
|00000e10| 20 4e 41 53 74 75 66 66 | 54 6f 6e 65 44 65 73 63 | NAStuff|ToneDesc|
|00000e20| 72 69 70 74 69 6f 6e 28 | 6e 61 2c 31 2c 26 6e 72 |ription(|na,1,&nr|
|00000e30| 2e 74 6f 6e 65 29 3b 09 | 2f 2a 20 31 20 69 73 20 |.tone);.|/* 1 is |
|00000e40| 50 69 61 6e 6f 20 2a 2f | 0d 0d 09 74 68 69 73 45 |Piano */|...thisE|
|00000e50| 72 72 6f 72 20 3d 20 4e | 41 4e 65 77 4e 6f 74 65 |rror = N|ANewNote|
|00000e60| 43 68 61 6e 6e 65 6c 28 | 6e 61 2c 26 6e 72 2c 26 |Channel(|na,&nr,&|
|00000e70| 6e 63 29 3b 0d 09 69 66 | 28 74 68 69 73 45 72 72 |nc);..if|(thisErr|
|00000e80| 6f 72 20 7c 7c 20 21 6e | 63 29 0d 09 09 67 6f 74 |or || !n|c)...got|
|00000e90| 6f 20 67 6f 48 6f 6d 65 | 3b 0d 0d 09 2f 2a 0d 09 |o goHome|;.../*..|
|00000ea0| 20 2a 20 70 6c 61 79 20 | 52 6f 67 65 72 20 53 68 | * play |Roger Sh|
|00000eb0| 65 70 61 72 64 27 73 20 | 6d 65 6c 6f 64 79 0d 09 |epard's |melody..|
|00000ec0| 20 2a 2f 0d 09 69 20 3d | 20 30 3b 0d 09 77 68 69 | */..i =| 0;..whi|
|00000ed0| 6c 65 28 21 42 75 74 74 | 6f 6e 28 29 29 0d 09 09 |le(!Butt|on())...|
|00000ee0| 7b 0d 09 09 66 6f 72 28 | 6a 20 3d 20 69 20 25 20 |{...for(|j = i % |
|00000ef0| 31 33 3b 20 6a 20 3c 20 | 31 32 38 3b 20 6a 2b 3d |13; j < |128; j+=|
|00000f00| 31 33 29 0d 09 09 09 7b | 0d 09 09 09 76 20 3d 20 |13)....{|....v = |
|00000f10| 6a 3c 36 34 20 3f 20 6a | 20 2a 20 32 20 3a 20 28 |j<64 ? j| * 2 : (|
|00000f20| 31 32 37 20 2d 20 6a 29 | 20 2a 20 32 3b 0d 09 09 |127 - j)| * 2;...|
|00000f30| 09 4e 41 50 6c 61 79 4e | 6f 74 65 28 6e 61 2c 6e |.NAPlayN|ote(na,n|
|00000f40| 63 2c 6a 2c 76 29 3b 0d | 09 09 09 7d 0d 09 09 44 |c,j,v);.|...}...D|
|00000f50| 65 6c 61 79 28 31 33 2c | 26 74 29 3b 0d 09 09 66 |elay(13,|&t);...f|
|00000f60| 6f 72 28 6a 20 3d 20 69 | 20 25 20 31 33 3b 20 6a |or(j = i| % 13; j|
|00000f70| 20 3c 20 31 32 38 3b 20 | 6a 2b 3d 31 33 29 0d 09 | < 128; |j+=13)..|
|00000f80| 09 09 4e 41 50 6c 61 79 | 4e 6f 74 65 28 6e 61 2c |..NAPlay|Note(na,|
|00000f90| 6e 63 2c 6a 2c 30 29 3b | 0d 09 09 69 2b 2b 3b 0d |nc,j,0);|...i++;.|
|00000fa0| 09 09 7d 0d 67 6f 48 6f | 6d 65 3a 0d 09 69 66 28 |..}.goHo|me:..if(|
|00000fb0| 6e 63 29 0d 09 09 4e 41 | 44 69 73 70 6f 73 65 4e |nc)...NA|DisposeN|
|00000fc0| 6f 74 65 43 68 61 6e 6e | 65 6c 28 6e 61 2c 6e 63 |oteChann|el(na,nc|
|00000fd0| 29 3b 0d 09 69 66 28 6e | 61 29 0d 09 09 43 6c 6f |);..if(n|a)...Clo|
|00000fe0| 73 65 43 6f 6d 70 6f 6e | 65 6e 74 28 6e 61 29 3b |seCompon|ent(na);|
|00000ff0| 0d 09 7d 0d 0d 0d 0d 76 | 6f 69 64 20 50 69 63 6b |..}....v|oid Pick|
|00001000| 54 68 65 6e 50 6c 61 79 | 53 6f 6d 65 4e 6f 74 65 |ThenPlay|SomeNote|
|00001010| 73 28 73 68 6f 72 74 20 | 78 78 31 2c 73 68 6f 72 |s(short |xx1,shor|
|00001020| 74 20 78 78 32 2c 73 68 | 6f 72 74 20 78 78 33 29 |t xx2,sh|ort xx3)|
|00001030| 09 2f 2a 20 64 75 6d 6d | 79 20 61 72 67 75 6d 65 |./* dumm|y argume|
|00001040| 6e 74 73 20 66 6f 72 20 | 62 69 67 20 65 61 73 79 |nts for |big easy|
|00001050| 20 73 68 65 6c 6c 20 2a | 2f 0d 09 7b 0d 09 4e 6f | shell *|/..{..No|
|00001060| 74 65 41 6c 6c 6f 63 61 | 74 6f 72 20 6e 61 3b 0d |teAlloca|tor na;.|
|00001070| 09 4e 6f 74 65 43 68 61 | 6e 6e 65 6c 20 6e 63 3b |.NoteCha|nnel nc;|
|00001080| 0d 09 4e 6f 74 65 52 65 | 71 75 65 73 74 20 6e 72 |..NoteRe|quest nr|
|00001090| 3b 0d 09 43 6f 6d 70 6f | 6e 65 6e 74 52 65 73 75 |;..Compo|nentResu|
|000010a0| 6c 74 20 74 68 69 73 45 | 72 72 6f 72 3b 0d 09 6c |lt thisE|rror;..l|
|000010b0| 6f 6e 67 20 74 2c 69 3b | 0d 0d 09 6e 61 20 3d 20 |ong t,i;|...na = |
|000010c0| 30 3b 0d 09 6e 63 20 3d | 20 30 3b 0d 0d 09 2f 2a |0;..nc =| 0;.../*|
|000010d0| 0d 09 20 2a 20 4f 70 65 | 6e 20 75 70 20 74 68 65 |.. * Ope|n up the|
|000010e0| 20 4e 6f 74 65 20 41 6c | 6c 6f 63 61 74 6f 72 0d | Note Al|locator.|
|000010f0| 09 20 2a 2f 0d 09 6e 61 | 20 3d 20 4f 70 65 6e 44 |. */..na| = OpenD|
|00001100| 65 66 61 75 6c 74 43 6f | 6d 70 6f 6e 65 6e 74 28 |efaultCo|mponent(|
|00001110| 27 6e 6f 74 61 27 2c 30 | 29 3b 0d 09 69 66 28 21 |'nota',0|);..if(!|
|00001120| 6e 61 29 0d 09 09 67 6f | 74 6f 20 67 6f 48 6f 6d |na)...go|to goHom|
|00001130| 65 3b 0d 0d 09 2f 2a 0d | 09 20 2a 20 46 69 6c 6c |e;.../*.|. * Fill|
|00001140| 20 6f 75 74 20 61 20 4e | 6f 74 65 20 52 65 71 75 | out a N|ote Requ|
|00001150| 65 73 74 20 75 73 69 6e | 67 20 4e 41 53 74 75 66 |est usin|g NAStuf|
|00001160| 66 54 6f 6e 65 44 65 73 | 63 72 69 70 74 69 6f 6e |fToneDes|cription|
|00001170| 0d 09 20 2a 20 74 6f 20 | 68 65 6c 70 2c 20 61 6e |.. * to |help, an|
|00001180| 64 20 61 6c 6c 6f 63 61 | 74 65 20 61 20 4e 6f 74 |d alloca|te a Not|
|00001190| 65 20 43 68 61 6e 6e 65 | 6c 0d 09 20 2a 2f 0d 09 |e Channe|l.. */..|
|000011a0| 6e 72 2e 70 6f 6c 79 70 | 68 6f 6e 79 20 3d 20 32 |nr.polyp|hony = 2|
|000011b0| 3b 09 09 2f 2a 20 73 69 | 6d 75 6c 74 61 6e 65 6f |;../* si|multaneo|
|000011c0| 75 73 20 74 6f 6e 65 73 | 20 2a 2f 0d 09 6e 72 2e |us tones| */..nr.|
|000011d0| 74 79 70 69 63 61 6c 50 | 6f 6c 79 70 68 6f 6e 79 |typicalP|olyphony|
|000011e0| 20 3d 20 30 78 30 30 30 | 31 30 30 30 30 3b 0d 09 | = 0x000|10000;..|
|000011f0| 74 68 69 73 45 72 72 6f | 72 20 3d 20 4e 41 53 74 |thisErro|r = NASt|
|00001200| 75 66 66 54 6f 6e 65 44 | 65 73 63 72 69 70 74 69 |uffToneD|escripti|
|00001210| 6f 6e 28 6e 61 2c 31 2c | 26 6e 72 2e 74 6f 6e 65 |on(na,1,|&nr.tone|
|00001220| 29 3b 09 2f 2a 20 31 20 | 69 73 20 50 69 61 6e 6f |);./* 1 |is Piano|
|00001230| 20 2a 2f 0d 0d 09 74 68 | 69 73 45 72 72 6f 72 20 | */...th|isError |
|00001240| 3d 20 4e 41 50 69 63 6b | 49 6e 73 74 72 75 6d 65 |= NAPick|Instrume|
|00001250| 6e 74 28 6e 61 2c 6e 69 | 6c 2c 22 5c 70 50 69 63 |nt(na,ni|l,"\pPic|
|00001260| 6b 20 41 6e 20 49 6e 73 | 74 72 75 6d 65 6e 74 3a |k An Ins|trument:|
|00001270| 22 2c 26 6e 72 2e 74 6f | 6e 65 2c 20 30 2c 30 2c |",&nr.to|ne, 0,0,|
|00001280| 30 2c 30 29 3b 0d 09 69 | 66 28 74 68 69 73 45 72 |0,0);..i|f(thisEr|
|00001290| 72 6f 72 29 0d 09 09 67 | 6f 74 6f 20 67 6f 48 6f |ror)...g|oto goHo|
|000012a0| 6d 65 3b 0d 0d 09 74 68 | 69 73 45 72 72 6f 72 20 |me;...th|isError |
|000012b0| 3d 20 4e 41 4e 65 77 4e | 6f 74 65 43 68 61 6e 6e |= NANewN|oteChann|
|000012c0| 65 6c 28 6e 61 2c 26 6e | 72 2c 26 6e 63 29 3b 0d |el(na,&n|r,&nc);.|
|000012d0| 09 69 66 28 74 68 69 73 | 45 72 72 6f 72 20 7c 7c |.if(this|Error |||
|000012e0| 20 21 6e 63 29 0d 09 09 | 67 6f 74 6f 20 67 6f 48 | !nc)...|goto goH|
|000012f0| 6f 6d 65 3b 0d 0d 09 2f | 2a 0d 09 20 2a 20 49 66 |ome;.../|*.. * If|
|00001300| 20 77 65 27 76 65 20 67 | 6f 74 74 65 6e 20 74 68 | we've g|otten th|
|00001310| 69 73 20 66 61 72 2c 20 | 74 68 65 6e 20 74 68 69 |is far, |then thi|
|00001320| 6e 67 73 20 61 72 65 20 | 6f 6b 0d 09 20 2a 20 74 |ngs are |ok.. * t|
|00001330| 6f 20 70 6c 61 79 20 73 | 6f 6d 65 20 6d 75 73 69 |o play s|ome musi|
|00001340| 63 61 6c 20 6e 6f 74 65 | 73 2e 20 4c 6f 76 65 6c |cal note|s. Lovel|
|00001350| 79 2e 0d 09 20 2a 2f 0d | 09 4e 41 50 6c 61 79 4e |y... */.|.NAPlayN|
|00001360| 6f 74 65 28 6e 61 2c 6e | 63 2c 36 30 2c 38 30 29 |ote(na,n|c,60,80)|
|00001370| 3b 09 2f 2a 20 6d 69 64 | 64 6c 65 20 43 20 61 74 |;./* mid|dle C at|
|00001380| 20 76 65 6c 6f 63 69 74 | 79 20 38 30 20 2a 2f 0d | velocit|y 80 */.|
|00001390| 09 44 65 6c 61 79 28 34 | 30 2c 26 74 29 3b 09 09 |.Delay(4|0,&t);..|
|000013a0| 09 2f 2a 20 64 65 6c 61 | 79 20 32 2f 33 20 6f 66 |./* dela|y 2/3 of|
|000013b0| 20 61 20 73 65 63 6f 6e | 64 20 2a 2f 0d 09 4e 41 | a secon|d */..NA|
|000013c0| 50 6c 61 79 4e 6f 74 65 | 28 6e 61 2c 6e 63 2c 36 |PlayNote|(na,nc,6|
|000013d0| 30 2c 30 29 3b 09 2f 2a | 20 6d 69 64 64 6c 65 20 |0,0);./*| middle |
|000013e0| 43 20 61 74 20 76 65 6c | 6f 63 69 74 79 20 30 3a |C at vel|ocity 0:|
|000013f0| 20 65 6e 64 20 6e 6f 74 | 65 20 2a 2f 0d 09 44 65 | end not|e */..De|
|00001400| 6c 61 79 28 34 30 2c 26 | 74 29 3b 09 09 09 2f 2a |lay(40,&|t);.../*|
|00001410| 20 64 65 6c 61 79 20 32 | 2f 33 20 6f 66 20 61 20 | delay 2|/3 of a |
|00001420| 73 65 63 6f 6e 64 20 2a | 2f 0d 0d 09 2f 2a 0d 09 |second *|/.../*..|
|00001430| 20 2a 20 4f 62 6c 69 67 | 61 74 6f 72 79 20 64 6f | * Oblig|atory do|
|00001440| 2d 6c 6f 6f 70 20 6f 66 | 20 72 69 73 69 6e 67 20 |-loop of| rising |
|00001450| 74 6f 6e 65 73 0d 09 20 | 2a 2f 0d 09 66 6f 72 28 |tones.. |*/..for(|
|00001460| 69 20 3d 20 36 30 3b 20 | 69 20 3c 3d 20 38 34 3b |i = 60; |i <= 84;|
|00001470| 20 69 2b 2b 29 0d 09 09 | 7b 0d 09 09 4e 41 50 6c | i++)...|{...NAPl|
|00001480| 61 79 4e 6f 74 65 28 6e | 61 2c 6e 63 2c 69 2c 38 |ayNote(n|a,nc,i,8|
|00001490| 30 29 3b 09 2f 2a 20 70 | 69 74 63 68 20 69 20 61 |0);./* p|itch i a|
|000014a0| 74 20 76 65 6c 6f 63 69 | 74 79 20 38 30 20 2a 2f |t veloci|ty 80 */|
|000014b0| 0d 09 09 4e 41 50 6c 61 | 79 4e 6f 74 65 28 6e 61 |...NAPla|yNote(na|
|000014c0| 2c 6e 63 2c 69 2b 37 2c | 38 30 29 3b 09 2f 2a 20 |,nc,i+7,|80);./* |
|000014d0| 70 69 74 63 68 20 69 2b | 37 20 28 6d 75 73 69 63 |pitch i+|7 (music|
|000014e0| 61 6c 20 66 69 66 74 68 | 29 20 61 74 20 76 65 6c |al fifth|) at vel|
|000014f0| 6f 63 69 74 79 20 38 30 | 20 2a 2f 0d 09 09 44 65 |ocity 80| */...De|
|00001500| 6c 61 79 28 31 30 2c 26 | 74 29 3b 09 09 09 2f 2a |lay(10,&|t);.../*|
|00001510| 20 64 65 6c 61 79 20 31 | 2f 36 20 6f 66 20 61 20 | delay 1|/6 of a |
|00001520| 73 65 63 6f 6e 64 20 2a | 2f 0d 09 09 4e 41 50 6c |second *|/...NAPl|
|00001530| 61 79 4e 6f 74 65 28 6e | 61 2c 6e 63 2c 69 2c 30 |ayNote(n|a,nc,i,0|
|00001540| 29 3b 09 2f 2a 20 70 69 | 74 63 68 20 69 20 61 74 |);./* pi|tch i at|
|00001550| 20 76 65 6c 6f 63 69 74 | 79 20 30 3a 20 65 6e 64 | velocit|y 0: end|
|00001560| 20 6e 6f 74 65 20 2a 2f | 0d 09 09 4e 41 50 6c 61 | note */|...NAPla|
|00001570| 79 4e 6f 74 65 28 6e 61 | 2c 6e 63 2c 69 2b 37 2c |yNote(na|,nc,i+7,|
|00001580| 30 29 3b 09 2f 2a 20 70 | 69 74 63 68 20 69 2b 37 |0);./* p|itch i+7|
|00001590| 20 61 74 20 76 65 6c 6f | 63 69 74 79 20 30 3a 20 | at velo|city 0: |
|000015a0| 65 6e 64 20 6e 6f 74 65 | 20 2a 2f 0d 09 09 7d 0d |end note| */...}.|
|000015b0| 67 6f 48 6f 6d 65 3a 0d | 09 69 66 28 6e 63 29 0d |goHome:.|.if(nc).|
|000015c0| 09 09 4e 41 44 69 73 70 | 6f 73 65 4e 6f 74 65 43 |..NADisp|oseNoteC|
|000015d0| 68 61 6e 6e 65 6c 28 6e | 61 2c 6e 63 29 3b 0d 09 |hannel(n|a,nc);..|
|000015e0| 69 66 28 6e 61 29 0d 09 | 09 43 6c 6f 73 65 43 6f |if(na)..|.CloseCo|
|000015f0| 6d 70 6f 6e 65 6e 74 28 | 6e 61 29 3b 0d 09 7d 0d |mponent(|na);..}.|
|00001600| 0d 0d 0d 76 6f 69 64 20 | 50 6c 61 79 53 6f 6d 65 |...void |PlaySome|
|00001610| 42 65 6e 74 4e 6f 74 65 | 73 28 73 68 6f 72 74 20 |BentNote|s(short |
|00001620| 78 78 31 2c 73 68 6f 72 | 74 20 78 78 32 2c 73 68 |xx1,shor|t xx2,sh|
|00001630| 6f 72 74 20 78 78 33 29 | 09 2f 2a 20 64 75 6d 6d |ort xx3)|./* dumm|
|00001640| 79 20 61 72 67 75 6d 65 | 6e 74 73 20 66 6f 72 20 |y argume|nts for |
|00001650| 62 69 67 20 65 61 73 79 | 20 73 68 65 6c 6c 20 2a |big easy| shell *|
|00001660| 2f 0d 09 7b 0d 09 4e 6f | 74 65 41 6c 6c 6f 63 61 |/..{..No|teAlloca|
|00001670| 74 6f 72 20 6e 61 3b 0d | 09 4e 6f 74 65 43 68 61 |tor na;.|.NoteCha|
|00001680| 6e 6e 65 6c 20 6e 63 3b | 0d 09 4e 6f 74 65 52 65 |nnel nc;|..NoteRe|
|00001690| 71 75 65 73 74 20 6e 72 | 3b 0d 09 43 6f 6d 70 6f |quest nr|;..Compo|
|000016a0| 6e 65 6e 74 52 65 73 75 | 6c 74 20 74 68 69 73 45 |nentResu|lt thisE|
|000016b0| 72 72 6f 72 3b 0d 09 6c | 6f 6e 67 20 74 2c 69 3b |rror;..l|ong t,i;|
|000016c0| 0d 0d 09 6e 61 20 3d 20 | 30 3b 0d 09 6e 63 20 3d |...na = |0;..nc =|
|000016d0| 20 30 3b 0d 0d 09 2f 2a | 0d 09 20 2a 20 4f 70 65 | 0;.../*|.. * Ope|
|000016e0| 6e 20 75 70 20 74 68 65 | 20 4e 6f 74 65 20 41 6c |n up the| Note Al|
|000016f0| 6c 6f 63 61 74 6f 72 0d | 09 20 2a 2f 0d 09 6e 61 |locator.|. */..na|
|00001700| 20 3d 20 4f 70 65 6e 44 | 65 66 61 75 6c 74 43 6f | = OpenD|efaultCo|
|00001710| 6d 70 6f 6e 65 6e 74 28 | 27 6e 6f 74 61 27 2c 30 |mponent(|'nota',0|
|00001720| 29 3b 0d 09 69 66 28 21 | 6e 61 29 0d 09 09 67 6f |);..if(!|na)...go|
|00001730| 74 6f 20 67 6f 48 6f 6d | 65 3b 0d 0d 09 2f 2a 0d |to goHom|e;.../*.|
|00001740| 09 20 2a 20 46 69 6c 6c | 20 6f 75 74 20 61 20 4e |. * Fill| out a N|
|00001750| 6f 74 65 20 52 65 71 75 | 65 73 74 20 75 73 69 6e |ote Requ|est usin|
|00001760| 67 20 4e 41 53 74 75 66 | 66 54 6f 6e 65 44 65 73 |g NAStuf|fToneDes|
|00001770| 63 72 69 70 74 69 6f 6e | 0d 09 20 2a 20 74 6f 20 |cription|.. * to |
|00001780| 68 65 6c 70 2c 20 61 6e | 64 20 61 6c 6c 6f 63 61 |help, an|d alloca|
|00001790| 74 65 20 61 20 4e 6f 74 | 65 20 43 68 61 6e 6e 65 |te a Not|e Channe|
|000017a0| 6c 0d 09 20 2a 2f 0d 09 | 6e 72 2e 70 6f 6c 79 70 |l.. */..|nr.polyp|
|000017b0| 68 6f 6e 79 20 3d 20 32 | 3b 09 09 2f 2a 20 73 69 |hony = 2|;../* si|
|000017c0| 6d 75 6c 74 61 6e 65 6f | 75 73 20 74 6f 6e 65 73 |multaneo|us tones|
|000017d0| 20 2a 2f 0d 09 6e 72 2e | 74 79 70 69 63 61 6c 50 | */..nr.|typicalP|
|000017e0| 6f 6c 79 70 68 6f 6e 79 | 20 3d 20 30 78 30 30 30 |olyphony| = 0x000|
|000017f0| 31 30 30 30 30 3b 0d 09 | 74 68 69 73 45 72 72 6f |10000;..|thisErro|
|00001800| 72 20 3d 20 4e 41 53 74 | 75 66 66 54 6f 6e 65 44 |r = NASt|uffToneD|
|00001810| 65 73 63 72 69 70 74 69 | 6f 6e 28 6e 61 2c 31 37 |escripti|on(na,17|
|00001820| 2c 26 6e 72 2e 74 6f 6e | 65 29 3b 09 2f 2a 20 31 |,&nr.ton|e);./* 1|
|00001830| 37 20 69 73 20 61 6e 20 | 6f 72 67 61 6e 20 74 6f |7 is an |organ to|
|00001840| 6e 65 20 2a 2f 0d 0d 09 | 74 68 69 73 45 72 72 6f |ne */...|thisErro|
|00001850| 72 20 3d 20 4e 41 4e 65 | 77 4e 6f 74 65 43 68 61 |r = NANe|wNoteCha|
|00001860| 6e 6e 65 6c 28 6e 61 2c | 26 6e 72 2c 26 6e 63 29 |nnel(na,|&nr,&nc)|
|00001870| 3b 0d 09 69 66 28 74 68 | 69 73 45 72 72 6f 72 20 |;..if(th|isError |
|00001880| 7c 7c 20 21 6e 63 29 0d | 09 09 67 6f 74 6f 20 67 ||| !nc).|..goto g|
|00001890| 6f 48 6f 6d 65 3b 0d 0d | 09 44 65 6c 61 79 28 33 |oHome;..|.Delay(3|
|000018a0| 30 2c 26 74 29 3b 0d 0d | 09 2f 2a 0d 09 20 2a 20 |0,&t);..|./*.. * |
|000018b0| 49 66 20 77 65 27 76 65 | 20 67 6f 74 74 65 6e 20 |If we've| gotten |
|000018c0| 74 68 69 73 20 66 61 72 | 2c 20 74 68 65 6e 20 74 |this far|, then t|
|000018d0| 68 69 6e 67 73 20 61 72 | 65 20 6f 6b 0d 09 20 2a |hings ar|e ok.. *|
|000018e0| 20 74 6f 20 70 6c 61 79 | 20 73 6f 6d 65 20 6d 75 | to play| some mu|
|000018f0| 73 69 63 61 6c 20 6e 6f | 74 65 73 2e 20 4c 6f 76 |sical no|tes. Lov|
|00001900| 65 6c 79 2e 0d 09 20 2a | 2f 0d 09 4e 41 50 6c 61 |ely... *|/..NAPla|
|00001910| 79 4e 6f 74 65 28 6e 61 | 2c 6e 63 2c 36 30 2c 38 |yNote(na|,nc,60,8|
|00001920| 30 29 3b 09 2f 2a 20 6d | 69 64 64 6c 65 20 43 20 |0);./* m|iddle C |
|00001930| 61 74 20 76 65 6c 6f 63 | 69 74 79 20 38 30 20 2a |at veloc|ity 80 *|
|00001940| 2f 0d 09 4e 41 50 6c 61 | 79 4e 6f 74 65 28 6e 61 |/..NAPla|yNote(na|
|00001950| 2c 6e 63 2c 36 37 2c 36 | 30 29 3b 09 2f 2a 20 67 |,nc,67,6|0);./* g|
|00001960| 20 61 74 20 76 65 6c 6f | 63 69 74 79 20 36 30 20 | at velo|city 60 |
|00001970| 2a 2f 0d 09 44 65 6c 61 | 79 28 33 30 2c 26 74 29 |*/..Dela|y(30,&t)|
|00001980| 3b 0d 0d 09 2f 2a 0d 09 | 20 2a 20 4c 6f 6f 70 20 |;.../*..| * Loop |
|00001990| 74 68 72 6f 75 67 68 20 | 64 69 66 66 65 72 69 6e |through |differin|
|000019a0| 67 20 70 69 74 63 68 20 | 62 65 6e 64 69 6e 67 73 |g pitch |bendings|
|000019b0| 0d 09 20 2a 2f 0d 09 66 | 6f 72 28 69 20 3d 20 30 |.. */..f|or(i = 0|
|000019c0| 3b 20 69 20 3c 3d 20 37 | 36 38 3b 20 69 2b 3d 20 |; i <= 7|68; i+= |
|000019d0| 31 30 29 09 09 2f 2a 20 | 62 65 6e 64 20 33 20 73 |10)../* |bend 3 s|
|000019e0| 65 6d 69 74 6f 6e 65 73 | 20 2a 2f 0d 09 09 7b 0d |emitones| */...{.|
|000019f0| 09 09 4e 41 53 65 74 43 | 6f 6e 74 72 6f 6c 6c 65 |..NASetC|ontrolle|
|00001a00| 72 28 6e 61 2c 6e 63 2c | 6b 43 6f 6e 74 72 6f 6c |r(na,nc,|kControl|
|00001a10| 6c 65 72 50 69 74 63 68 | 42 65 6e 64 2c 69 29 3b |lerPitch|Bend,i);|
|00001a20| 0d 09 09 44 65 6c 61 79 | 28 31 2c 26 74 29 3b 0d |...Delay|(1,&t);.|
|00001a30| 09 09 7d 0d 09 44 65 6c | 61 79 28 33 30 2c 26 74 |..}..Del|ay(30,&t|
|00001a40| 29 3b 0d 09 66 6f 72 28 | 69 20 3d 20 37 36 38 3b |);..for(|i = 768;|
|00001a50| 20 69 20 3e 3d 20 30 3b | 20 69 2d 3d 20 31 30 29 | i >= 0;| i-= 10)|
|00001a60| 09 09 2f 2a 20 62 65 6e | 64 20 62 61 63 6b 20 74 |../* ben|d back t|
|00001a70| 6f 20 6e 6f 72 6d 61 6c | 2a 2f 0d 09 09 7b 0d 09 |o normal|*/...{..|
|00001a80| 09 4e 41 53 65 74 43 6f | 6e 74 72 6f 6c 6c 65 72 |.NASetCo|ntroller|
|00001a90| 28 6e 61 2c 6e 63 2c 6b | 43 6f 6e 74 72 6f 6c 6c |(na,nc,k|Controll|
|00001aa0| 65 72 50 69 74 63 68 42 | 65 6e 64 2c 69 29 3b 0d |erPitchB|end,i);.|
|00001ab0| 09 09 44 65 6c 61 79 28 | 31 2c 26 74 29 3b 0d 09 |..Delay(|1,&t);..|
|00001ac0| 09 7d 0d 09 44 65 6c 61 | 79 28 33 30 2c 26 74 29 |.}..Dela|y(30,&t)|
|00001ad0| 3b 0d 0d 09 4e 41 50 6c | 61 79 4e 6f 74 65 28 6e |;...NAPl|ayNote(n|
|00001ae0| 61 2c 6e 63 2c 36 30 2c | 30 29 3b 09 2f 2a 20 6d |a,nc,60,|0);./* m|
|00001af0| 69 64 64 6c 65 20 43 20 | 6f 66 66 20 2a 2f 0d 09 |iddle C |off */..|
|00001b00| 4e 41 50 6c 61 79 4e 6f | 74 65 28 6e 61 2c 6e 63 |NAPlayNo|te(na,nc|
|00001b10| 2c 36 37 2c 30 29 3b 09 | 2f 2a 20 47 20 6f 66 66 |,67,0);.|/* G off|
|00001b20| 20 2a 2f 0d 0d 67 6f 48 | 6f 6d 65 3a 0d 09 69 66 | */..goH|ome:..if|
|00001b30| 28 6e 63 29 0d 09 09 4e | 41 44 69 73 70 6f 73 65 |(nc)...N|ADispose|
|00001b40| 4e 6f 74 65 43 68 61 6e | 6e 65 6c 28 6e 61 2c 6e |NoteChan|nel(na,n|
|00001b50| 63 29 3b 0d 09 69 66 28 | 6e 61 29 0d 09 09 43 6c |c);..if(|na)...Cl|
|00001b60| 6f 73 65 43 6f 6d 70 6f | 6e 65 6e 74 28 6e 61 29 |oseCompo|nent(na)|
|00001b70| 3b 0d 09 7d 0d 0d 0d 23 | 64 65 66 69 6e 65 20 6b |;..}...#|define k|
|00001b80| 4e 6f 74 65 52 65 71 75 | 65 73 74 48 65 61 64 65 |NoteRequ|estHeade|
|00001b90| 72 45 76 65 6e 74 4c 65 | 6e 67 74 68 20 28 73 69 |rEventLe|ngth (si|
|00001ba0| 7a 65 6f 66 28 4e 6f 74 | 65 52 65 71 75 65 73 74 |zeof(Not|eRequest|
|00001bb0| 29 2f 73 69 7a 65 6f 66 | 28 6c 6f 6e 67 29 20 2b |)/sizeof|(long) +|
|00001bc0| 20 32 29 20 2f 2a 20 6c | 6f 6e 67 77 6f 72 64 73 | 2) /* l|ongwords|
|00001bd0| 20 2a 2f 0d 75 6e 73 69 | 67 6e 65 64 20 6c 6f 6e | */.unsi|gned lon|
|00001be0| 67 20 2a 42 75 69 6c 64 | 54 75 6e 65 48 65 61 64 |g *Build|TuneHead|
|00001bf0| 65 72 28 6c 6f 6e 67 20 | 2a 6c 6f 6e 67 43 6f 75 |er(long |*longCou|
|00001c00| 6e 74 29 0d 09 7b 0d 09 | 75 6e 73 69 67 6e 65 64 |nt)..{..|unsigned|
|00001c10| 20 6c 6f 6e 67 20 2a 68 | 65 61 64 65 72 3b 0d 09 | long *h|eader;..|
|00001c20| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 2a 77 |unsigned| long *w|
|00001c30| 2c 2a 77 32 3b 0d 09 4e | 6f 74 65 52 65 71 75 65 |,*w2;..N|oteReque|
|00001c40| 73 74 20 2a 6e 72 3b 0d | 09 4e 6f 74 65 41 6c 6c |st *nr;.|.NoteAll|
|00001c50| 6f 63 61 74 6f 72 20 6e | 61 3b 09 2f 2a 20 6a 75 |ocator n|a;./* ju|
|00001c60| 73 74 20 66 6f 72 20 74 | 68 65 20 4e 41 53 74 75 |st for t|he NAStu|
|00001c70| 66 66 54 6f 6e 65 44 65 | 73 63 72 69 70 74 69 6f |ffToneDe|scriptio|
|00001c80| 6e 20 63 61 6c 6c 20 2a | 2f 0d 09 43 6f 6d 70 6f |n call *|/..Compo|
|00001c90| 6e 65 6e 74 52 65 73 75 | 6c 74 20 74 68 69 73 45 |nentResu|lt thisE|
|00001ca0| 72 72 6f 72 3b 0d 0d 09 | 68 65 61 64 65 72 20 3d |rror;...|header =|
|00001cb0| 20 30 3b 0d 09 6e 61 20 | 3d 20 30 3b 0d 0d 09 2f | 0;..na |= 0;.../|
|00001cc0| 2a 0d 09 20 2a 20 4f 70 | 65 6e 20 75 70 20 74 68 |*.. * Op|en up th|
|00001cd0| 65 20 4e 6f 74 65 20 41 | 6c 6c 6f 63 61 74 6f 72 |e Note A|llocator|
|00001ce0| 0d 09 20 2a 2f 0d 09 6e | 61 20 3d 20 4f 70 65 6e |.. */..n|a = Open|
|00001cf0| 44 65 66 61 75 6c 74 43 | 6f 6d 70 6f 6e 65 6e 74 |DefaultC|omponent|
|00001d00| 28 27 6e 6f 74 61 27 2c | 30 29 3b 0d 09 69 66 28 |('nota',|0);..if(|
|00001d10| 21 6e 61 29 0d 09 09 67 | 6f 74 6f 20 67 6f 48 6f |!na)...g|oto goHo|
|00001d20| 6d 65 3b 0d 0d 09 2f 2a | 0d 09 20 2a 20 41 6c 6c |me;.../*|.. * All|
|00001d30| 6f 63 61 74 65 20 73 70 | 61 63 65 20 66 6f 72 20 |ocate sp|ace for |
|00001d40| 74 68 65 20 74 75 6e 65 | 20 68 65 61 64 65 72 2c |the tune| header,|
|00001d50| 0d 09 20 2a 20 72 61 74 | 68 65 72 20 69 6e 66 6c |.. * rat|her infl|
|00001d60| 65 78 69 62 6c 79 2e 0d | 09 20 2a 2f 0d 09 68 65 |exibly..|. */..he|
|00001d70| 61 64 65 72 20 3d 20 28 | 75 6e 73 69 67 6e 65 64 |ader = (|unsigned|
|00001d80| 20 6c 6f 6e 67 20 2a 29 | 0d 09 09 09 4e 65 77 50 | long *)|....NewP|
|00001d90| 74 72 43 6c 65 61 72 28 | 28 32 20 2a 20 6b 4e 6f |trClear(|(2 * kNo|
|00001da0| 74 65 52 65 71 75 65 73 | 74 48 65 61 64 65 72 45 |teReques|tHeaderE|
|00001db0| 76 65 6e 74 4c 65 6e 67 | 74 68 20 2b 20 31 29 20 |ventLeng|th + 1) |
|00001dc0| 2a 20 73 69 7a 65 6f 66 | 28 6c 6f 6e 67 29 29 3b |* sizeof|(long));|
|00001dd0| 0d 09 69 66 28 21 68 65 | 61 64 65 72 29 0d 09 09 |..if(!he|ader)...|
|00001de0| 67 6f 74 6f 20 67 6f 48 | 6f 6d 65 3b 0d 0d 09 77 |goto goH|ome;...w|
|00001df0| 20 3d 20 68 65 61 64 65 | 72 3b 0d 0d 09 2f 2a 0d | = heade|r;.../*.|
|00001e00| 09 20 2a 20 53 74 75 66 | 66 20 72 65 71 75 65 73 |. * Stuf|f reques|
|00001e10| 74 20 66 6f 72 20 70 69 | 61 6e 6f 20 70 6f 6c 79 |t for pi|ano poly|
|00001e20| 70 68 6f 6e 79 20 34 0d | 09 20 2a 2f 0d 09 77 32 |phony 4.|. */..w2|
|00001e30| 20 3d 20 77 20 2b 20 6b | 4e 6f 74 65 52 65 71 75 | = w + k|NoteRequ|
|00001e40| 65 73 74 48 65 61 64 65 | 72 45 76 65 6e 74 4c 65 |estHeade|rEventLe|
|00001e50| 6e 67 74 68 20 2d 20 31 | 3b 20 2f 2a 20 6c 61 73 |ngth - 1|; /* las|
|00001e60| 74 20 6c 6f 6e 67 77 6f | 72 64 20 6f 66 20 67 65 |t longwo|rd of ge|
|00001e70| 6e 65 72 61 6c 20 65 76 | 65 6e 74 20 2a 2f 0d 09 |neral ev|ent */..|
|00001e80| 5f 53 74 75 66 66 47 65 | 6e 65 72 61 6c 45 76 65 |_StuffGe|neralEve|
|00001e90| 6e 74 28 2a 77 2c 2a 77 | 32 2c 20 31 2c 20 6b 47 |nt(*w,*w|2, 1, kG|
|00001ea0| 65 6e 65 72 61 6c 45 76 | 65 6e 74 4e 6f 74 65 52 |eneralEv|entNoteR|
|00001eb0| 65 71 75 65 73 74 2c 20 | 6b 4e 6f 74 65 52 65 71 |equest, |kNoteReq|
|00001ec0| 75 65 73 74 48 65 61 64 | 65 72 45 76 65 6e 74 4c |uestHead|erEventL|
|00001ed0| 65 6e 67 74 68 29 3b 0d | 09 6e 72 20 3d 20 28 4e |ength);.|.nr = (N|
|00001ee0| 6f 74 65 52 65 71 75 65 | 73 74 20 2a 29 28 77 20 |oteReque|st *)(w |
|00001ef0| 2b 20 31 29 3b 0d 09 6e | 72 2d 3e 70 6f 6c 79 70 |+ 1);..n|r->polyp|
|00001f00| 68 6f 6e 79 20 3d 20 34 | 3b 09 09 2f 2a 20 73 69 |hony = 4|;../* si|
|00001f10| 6d 75 6c 74 61 6e 65 6f | 75 73 20 74 6f 6e 65 73 |multaneo|us tones|
|00001f20| 20 2a 2f 0d 09 6e 72 2d | 3e 74 79 70 69 63 61 6c | */..nr-|>typical|
|00001f30| 50 6f 6c 79 70 68 6f 6e | 79 20 3d 20 30 78 30 30 |Polyphon|y = 0x00|
|00001f40| 30 31 30 30 30 30 3b 0d | 09 74 68 69 73 45 72 72 |010000;.|.thisErr|
|00001f50| 6f 72 20 3d 20 4e 41 53 | 74 75 66 66 54 6f 6e 65 |or = NAS|tuffTone|
|00001f60| 44 65 73 63 72 69 70 74 | 69 6f 6e 28 6e 61 2c 31 |Descript|ion(na,1|
|00001f70| 2c 26 6e 72 2d 3e 74 6f | 6e 65 29 3b 09 2f 2a 20 |,&nr->to|ne);./* |
|00001f80| 31 20 69 73 20 50 69 61 | 6e 6f 20 2a 2f 0d 09 77 |1 is Pia|no */..w|
|00001f90| 20 2b 3d 20 6b 4e 6f 74 | 65 52 65 71 75 65 73 74 | += kNot|eRequest|
|00001fa0| 48 65 61 64 65 72 45 76 | 65 6e 74 4c 65 6e 67 74 |HeaderEv|entLengt|
|00001fb0| 68 3b 0d 0d 09 2f 2a 0d | 09 20 2a 20 53 74 75 66 |h;.../*.|. * Stuf|
|00001fc0| 66 20 72 65 71 75 65 73 | 74 20 66 6f 72 20 76 69 |f reques|t for vi|
|00001fd0| 6f 6c 69 6e 20 70 6f 6c | 79 70 68 6f 6e 79 20 33 |olin pol|yphony 3|
|00001fe0| 0d 09 20 2a 2f 0d 09 77 | 32 20 3d 20 77 20 2b 20 |.. */..w|2 = w + |
|00001ff0| 6b 4e 6f 74 65 52 65 71 | 75 65 73 74 48 65 61 64 |kNoteReq|uestHead|
|00002000| 65 72 45 76 65 6e 74 4c | 65 6e 67 74 68 20 2d 20 |erEventL|ength - |
|00002010| 31 3b 20 2f 2a 20 6c 61 | 73 74 20 6c 6f 6e 67 77 |1; /* la|st longw|
|00002020| 6f 72 64 20 6f 66 20 67 | 65 6e 65 72 61 6c 20 65 |ord of g|eneral e|
|00002030| 76 65 6e 74 20 2a 2f 0d | 09 5f 53 74 75 66 66 47 |vent */.|._StuffG|
|00002040| 65 6e 65 72 61 6c 45 76 | 65 6e 74 28 2a 77 2c 2a |eneralEv|ent(*w,*|
|00002050| 77 32 2c 20 32 2c 20 6b | 47 65 6e 65 72 61 6c 45 |w2, 2, k|GeneralE|
|00002060| 76 65 6e 74 4e 6f 74 65 | 52 65 71 75 65 73 74 2c |ventNote|Request,|
|00002070| 20 6b 4e 6f 74 65 52 65 | 71 75 65 73 74 48 65 61 | kNoteRe|questHea|
|00002080| 64 65 72 45 76 65 6e 74 | 4c 65 6e 67 74 68 29 3b |derEvent|Length);|
|00002090| 0d 09 6e 72 20 3d 20 28 | 4e 6f 74 65 52 65 71 75 |..nr = (|NoteRequ|
|000020a0| 65 73 74 20 2a 29 28 77 | 20 2b 20 31 29 3b 0d 09 |est *)(w| + 1);..|
|000020b0| 6e 72 2d 3e 70 6f 6c 79 | 70 68 6f 6e 79 20 3d 20 |nr->poly|phony = |
|000020c0| 33 3b 09 09 2f 2a 20 73 | 69 6d 75 6c 74 61 6e 65 |3;../* s|imultane|
|000020d0| 6f 75 73 20 74 6f 6e 65 | 73 20 2a 2f 0d 09 6e 72 |ous tone|s */..nr|
|000020e0| 2d 3e 74 79 70 69 63 61 | 6c 50 6f 6c 79 70 68 6f |->typica|lPolypho|
|000020f0| 6e 79 20 3d 20 30 78 30 | 30 30 31 30 30 30 30 3b |ny = 0x0|0010000;|
|00002100| 0d 09 74 68 69 73 45 72 | 72 6f 72 20 3d 20 4e 41 |..thisEr|ror = NA|
|00002110| 53 74 75 66 66 54 6f 6e | 65 44 65 73 63 72 69 70 |StuffTon|eDescrip|
|00002120| 74 69 6f 6e 28 6e 61 2c | 34 31 2c 26 6e 72 2d 3e |tion(na,|41,&nr->|
|00002130| 74 6f 6e 65 29 3b 09 2f | 2a 20 3f 3f 3f 21 21 21 |tone);./|* ???!!!|
|00002140| 20 77 68 61 74 20 69 73 | 20 76 69 6f 6c 69 6e 3f | what is| violin?|
|00002150| 20 2a 2f 0d 09 77 20 2b | 3d 20 6b 4e 6f 74 65 52 | */..w +|= kNoteR|
|00002160| 65 71 75 65 73 74 48 65 | 61 64 65 72 45 76 65 6e |equestHe|aderEven|
|00002170| 74 4c 65 6e 67 74 68 3b | 0d 0d 09 2a 77 2b 2b 20 |tLength;|...*w++ |
|00002180| 3d 20 30 78 36 30 30 30 | 30 30 30 30 3b 09 09 2f |= 0x6000|0000;../|
|00002190| 2a 20 65 6e 64 20 6f 66 | 20 73 65 71 75 65 6e 63 |* end of| sequenc|
|000021a0| 65 20 6d 61 72 6b 65 72 | 20 2a 2f 0d 0d 0d 67 6f |e marker| */...go|
|000021b0| 48 6f 6d 65 3a 0d 09 69 | 66 28 6e 61 29 0d 09 09 |Home:..i|f(na)...|
|000021c0| 43 6c 6f 73 65 43 6f 6d | 70 6f 6e 65 6e 74 28 6e |CloseCom|ponent(n|
|000021d0| 61 29 3b 0d 0d 09 69 66 | 28 6c 6f 6e 67 43 6f 75 |a);...if|(longCou|
|000021e0| 6e 74 29 0d 09 09 2a 6c | 6f 6e 67 43 6f 75 6e 74 |nt)...*l|ongCount|
|000021f0| 20 3d 20 32 20 2a 20 6b | 4e 6f 74 65 52 65 71 75 | = 2 * k|NoteRequ|
|00002200| 65 73 74 48 65 61 64 65 | 72 45 76 65 6e 74 4c 65 |estHeade|rEventLe|
|00002210| 6e 67 74 68 3b 0d 0d 09 | 72 65 74 75 72 6e 20 68 |ngth;...|return h|
|00002220| 65 61 64 65 72 3b 0d 09 | 7d 0d 0d 48 61 6e 64 6c |eader;..|}..Handl|
|00002230| 65 20 42 75 69 6c 64 54 | 75 6e 65 53 65 71 75 65 |e BuildT|uneSeque|
|00002240| 6e 63 65 28 6c 6f 6e 67 | 20 2a 64 75 72 61 74 69 |nce(long| *durati|
|00002250| 6f 6e 29 0d 09 7b 0d 09 | 75 6e 73 69 67 6e 65 64 |on)..{..|unsigned|
|00002260| 20 6c 6f 6e 67 20 2a 73 | 65 71 75 65 6e 63 65 3b | long *s|equence;|
|00002270| 0d 09 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 20 |..unsign|ed long |
|00002280| 2a 77 3b 0d 09 48 61 6e | 64 6c 65 20 68 3b 0d 0d |*w;..Han|dle h;..|
|00002290| 09 2f 2a 0d 09 20 2a 20 | 41 6c 6c 6f 63 61 74 65 |./*.. * |Allocate|
|000022a0| 20 73 70 61 63 65 20 66 | 6f 72 20 74 68 65 20 74 | space f|or the t|
|000022b0| 75 6e 65 20 73 65 71 75 | 65 6e 63 65 2c 0d 09 20 |une sequ|ence,.. |
|000022c0| 2a 20 72 61 74 68 65 72 | 20 69 6e 66 6c 65 78 69 |* rather| inflexi|
|000022d0| 62 6c 79 2e 0d 09 20 2a | 2f 0d 23 64 65 66 69 6e |bly... *|/.#defin|
|000022e0| 65 20 6b 4e 6f 74 65 44 | 75 72 61 74 69 6f 6e 20 |e kNoteD|uration |
|000022f0| 32 34 30 20 2f 2a 20 69 | 6e 20 36 30 30 74 68 73 |240 /* i|n 600ths|
|00002300| 20 6f 66 20 61 20 73 65 | 63 6f 6e 64 20 2a 2f 0d | of a se|cond */.|
|00002310| 23 64 65 66 69 6e 65 20 | 6b 52 65 73 74 44 75 72 |#define |kRestDur|
|00002320| 61 74 69 6f 6e 20 33 30 | 30 20 2f 2a 20 69 6e 20 |ation 30|0 /* in |
|00002330| 36 30 30 74 68 73 20 2d | 20 74 65 6d 70 6f 20 77 |600ths -| tempo w|
|00002340| 69 6c 6c 20 62 65 20 31 | 32 30 62 70 6d 20 2a 2f |ill be 1|20bpm */|
|00002350| 0d 0d 09 68 20 3d 20 4e | 65 77 48 61 6e 64 6c 65 |...h = N|ewHandle|
|00002360| 43 6c 65 61 72 28 32 32 | 20 2a 20 73 69 7a 65 6f |Clear(22| * sizeo|
|00002370| 66 28 6c 6f 6e 67 29 29 | 3b 0d 09 69 66 28 21 68 |f(long))|;..if(!h|
|00002380| 29 0d 09 09 67 6f 74 6f | 20 67 6f 48 6f 6d 65 3b |)...goto| goHome;|
|00002390| 0d 09 48 4c 6f 63 6b 28 | 68 29 3b 0d 09 73 65 71 |..HLock(|h);..seq|
|000023a0| 75 65 6e 63 65 20 3d 20 | 28 75 6e 73 69 67 6e 65 |uence = |(unsigne|
|000023b0| 64 20 6c 6f 6e 67 20 2a | 29 20 2a 68 3b 0d 0d 09 |d long *|) *h;...|
|000023c0| 77 20 3d 20 73 65 71 75 | 65 6e 63 65 3b 0d 0d 09 |w = sequ|ence;...|
|000023d0| 5f 53 74 75 66 66 4e 6f | 74 65 45 76 65 6e 74 28 |_StuffNo|teEvent(|
|000023e0| 2a 77 2b 2b 2c 31 2c 36 | 30 2c 31 30 30 2c 6b 4e |*w++,1,6|0,100,kN|
|000023f0| 6f 74 65 44 75 72 61 74 | 69 6f 6e 29 3b 09 2f 2a |oteDurat|ion);./*|
|00002400| 20 70 69 61 6e 6f 20 43 | 20 2a 2f 0d 09 5f 53 74 | piano C| */.._St|
|00002410| 75 66 66 52 65 73 74 45 | 76 65 6e 74 28 2a 77 2b |uffRestE|vent(*w+|
|00002420| 2b 2c 6b 52 65 73 74 44 | 75 72 61 74 69 6f 6e 29 |+,kRestD|uration)|
|00002430| 3b 0d 09 5f 53 74 75 66 | 66 4e 6f 74 65 45 76 65 |;.._Stuf|fNoteEve|
|00002440| 6e 74 28 2a 77 2b 2b 2c | 32 2c 36 30 2c 31 30 30 |nt(*w++,|2,60,100|
|00002450| 2c 6b 4e 6f 74 65 44 75 | 72 61 74 69 6f 6e 29 3b |,kNoteDu|ration);|
|00002460| 09 2f 2a 20 76 69 6f 6c | 69 6e 20 43 20 2a 2f 0d |./* viol|in C */.|
|00002470| 09 5f 53 74 75 66 66 52 | 65 73 74 45 76 65 6e 74 |._StuffR|estEvent|
|00002480| 28 2a 77 2b 2b 2c 6b 52 | 65 73 74 44 75 72 61 74 |(*w++,kR|estDurat|
|00002490| 69 6f 6e 29 3b 0d 0d 09 | 5f 53 74 75 66 66 4e 6f |ion);...|_StuffNo|
|000024a0| 74 65 45 76 65 6e 74 28 | 2a 77 2b 2b 2c 31 2c 36 |teEvent(|*w++,1,6|
|000024b0| 33 2c 31 30 30 2c 6b 4e | 6f 74 65 44 75 72 61 74 |3,100,kN|oteDurat|
|000024c0| 69 6f 6e 29 3b 09 2f 2a | 20 70 69 61 6e 6f 20 2a |ion);./*| piano *|
|000024d0| 2f 0d 09 5f 53 74 75 66 | 66 52 65 73 74 45 76 65 |/.._Stuf|fRestEve|
|000024e0| 6e 74 28 2a 77 2b 2b 2c | 6b 52 65 73 74 44 75 72 |nt(*w++,|kRestDur|
|000024f0| 61 74 69 6f 6e 29 3b 0d | 09 5f 53 74 75 66 66 4e |ation);.|._StuffN|
|00002500| 6f 74 65 45 76 65 6e 74 | 28 2a 77 2b 2b 2c 32 2c |oteEvent|(*w++,2,|
|00002510| 36 34 2c 31 30 30 2c 6b | 4e 6f 74 65 44 75 72 61 |64,100,k|NoteDura|
|00002520| 74 69 6f 6e 29 3b 09 2f | 2a 20 76 69 6f 6c 69 6e |tion);./|* violin|
|00002530| 20 2a 2f 0d 09 5f 53 74 | 75 66 66 52 65 73 74 45 | */.._St|uffRestE|
|00002540| 76 65 6e 74 28 2a 77 2b | 2b 2c 6b 52 65 73 74 44 |vent(*w+|+,kRestD|
|00002550| 75 72 61 74 69 6f 6e 29 | 3b 0d 0d 09 2f 2a 0d 09 |uration)|;.../*..|
|00002560| 20 2a 20 6d 61 6b 65 20 | 74 68 65 20 35 74 68 20 | * make |the 5th |
|00002570| 61 6e 64 20 36 74 68 20 | 6e 6f 74 65 73 20 6d 75 |and 6th |notes mu|
|00002580| 63 68 20 73 6f 66 74 65 | 72 2c 20 6a 75 73 74 20 |ch softe|r, just |
|00002590| 66 6f 72 20 66 75 6e 0d | 09 20 2a 2f 0d 09 5f 53 |for fun.|. */.._S|
|000025a0| 74 75 66 66 4e 6f 74 65 | 45 76 65 6e 74 28 2a 77 |tuffNote|Event(*w|
|000025b0| 2b 2b 2c 31 2c 36 37 2c | 36 30 2c 6b 4e 6f 74 65 |++,1,67,|60,kNote|
|000025c0| 44 75 72 61 74 69 6f 6e | 29 3b 09 2f 2a 20 70 69 |Duration|);./* pi|
|000025d0| 61 6e 6f 20 2a 2f 0d 09 | 5f 53 74 75 66 66 52 65 |ano */..|_StuffRe|
|000025e0| 73 74 45 76 65 6e 74 28 | 2a 77 2b 2b 2c 6b 52 65 |stEvent(|*w++,kRe|
|000025f0| 73 74 44 75 72 61 74 69 | 6f 6e 29 3b 0d 09 5f 53 |stDurati|on);.._S|
|00002600| 74 75 66 66 4e 6f 74 65 | 45 76 65 6e 74 28 2a 77 |tuffNote|Event(*w|
|00002610| 2b 2b 2c 32 2c 36 36 2c | 36 30 2c 6b 4e 6f 74 65 |++,2,66,|60,kNote|
|00002620| 44 75 72 61 74 69 6f 6e | 29 3b 09 2f 2a 20 76 69 |Duration|);./* vi|
|00002630| 6f 6c 69 6e 20 2a 2f 0d | 09 5f 53 74 75 66 66 52 |olin */.|._StuffR|
|00002640| 65 73 74 45 76 65 6e 74 | 28 2a 77 2b 2b 2c 6b 52 |estEvent|(*w++,kR|
|00002650| 65 73 74 44 75 72 61 74 | 69 6f 6e 29 3b 0d 0d 09 |estDurat|ion);...|
|00002660| 5f 53 74 75 66 66 4e 6f | 74 65 45 76 65 6e 74 28 |_StuffNo|teEvent(|
|00002670| 2a 77 2b 2b 2c 31 2c 37 | 32 2c 31 30 30 2c 6b 4e |*w++,1,7|2,100,kN|
|00002680| 6f 74 65 44 75 72 61 74 | 69 6f 6e 29 3b 09 2f 2a |oteDurat|ion);./*|
|00002690| 20 70 69 61 6e 6f 20 2a | 2f 0d 09 5f 53 74 75 66 | piano *|/.._Stuf|
|000026a0| 66 52 65 73 74 45 76 65 | 6e 74 28 2a 77 2b 2b 2c |fRestEve|nt(*w++,|
|000026b0| 6b 52 65 73 74 44 75 72 | 61 74 69 6f 6e 29 3b 0d |kRestDur|ation);.|
|000026c0| 09 5f 53 74 75 66 66 4e | 6f 74 65 45 76 65 6e 74 |._StuffN|oteEvent|
|000026d0| 28 2a 77 2b 2b 2c 32 2c | 37 33 2c 31 30 30 2c 6b |(*w++,2,|73,100,k|
|000026e0| 4e 6f 74 65 44 75 72 61 | 74 69 6f 6e 29 3b 09 2f |NoteDura|tion);./|
|000026f0| 2a 20 76 69 6f 6c 69 6e | 20 2a 2f 0d 09 5f 53 74 |* violin| */.._St|
|00002700| 75 66 66 52 65 73 74 45 | 76 65 6e 74 28 2a 77 2b |uffRestE|vent(*w+|
|00002710| 2b 2c 6b 52 65 73 74 44 | 75 72 61 74 69 6f 6e 29 |+,kRestD|uration)|
|00002720| 3b 0d 0d 09 5f 53 74 75 | 66 66 4e 6f 74 65 45 76 |;..._Stu|ffNoteEv|
|00002730| 65 6e 74 28 2a 77 2b 2b | 2c 31 2c 36 30 2c 31 30 |ent(*w++|,1,60,10|
|00002740| 30 2c 6b 4e 6f 74 65 44 | 75 72 61 74 69 6f 6e 29 |0,kNoteD|uration)|
|00002750| 3b 09 2f 2a 20 70 69 61 | 6e 6f 20 2a 2f 0d 09 5f |;./* pia|no */.._|
|00002760| 53 74 75 66 66 4e 6f 74 | 65 45 76 65 6e 74 28 2a |StuffNot|eEvent(*|
|00002770| 77 2b 2b 2c 31 2c 36 37 | 2c 31 30 30 2c 6b 4e 6f |w++,1,67|,100,kNo|
|00002780| 74 65 44 75 72 61 74 69 | 6f 6e 29 3b 09 2f 2a 20 |teDurati|on);./* |
|00002790| 70 69 61 6e 6f 20 2a 2f | 0d 09 5f 53 74 75 66 66 |piano */|.._Stuff|
|000027a0| 4e 6f 74 65 45 76 65 6e | 74 28 2a 77 2b 2b 2c 32 |NoteEven|t(*w++,2|
|000027b0| 2c 36 33 2c 31 30 30 2c | 6b 4e 6f 74 65 44 75 72 |,63,100,|kNoteDur|
|000027c0| 61 74 69 6f 6e 29 3b 09 | 2f 2a 20 76 69 6f 6c 69 |ation);.|/* violi|
|000027d0| 6e 20 2a 2f 0d 09 5f 53 | 74 75 66 66 4e 6f 74 65 |n */.._S|tuffNote|
|000027e0| 45 76 65 6e 74 28 2a 77 | 2b 2b 2c 32 2c 37 32 2c |Event(*w|++,2,72,|
|000027f0| 31 30 30 2c 6b 4e 6f 74 | 65 44 75 72 61 74 69 6f |100,kNot|eDuratio|
|00002800| 6e 29 3b 09 2f 2a 20 76 | 69 6f 6c 69 6e 20 2a 2f |n);./* v|iolin */|
|00002810| 0d 09 5f 53 74 75 66 66 | 52 65 73 74 45 76 65 6e |.._Stuff|RestEven|
|00002820| 74 28 2a 77 2b 2b 2c 6b | 52 65 73 74 44 75 72 61 |t(*w++,k|RestDura|
|00002830| 74 69 6f 6e 29 3b 0d 0d | 09 2a 77 2b 2b 20 3d 20 |tion);..|.*w++ = |
|00002840| 30 78 36 30 30 30 30 30 | 30 30 3b 09 2f 2a 20 65 |0x600000|00;./* e|
|00002850| 6e 64 20 6d 61 72 6b 65 | 72 20 2a 2f 0d 0d 67 6f |nd marke|r */..go|
|00002860| 48 6f 6d 65 3a 0d 09 69 | 66 28 64 75 72 61 74 69 |Home:..i|f(durati|
|00002870| 6f 6e 29 0d 09 09 2a 64 | 75 72 61 74 69 6f 6e 20 |on)...*d|uration |
|00002880| 3d 20 39 20 2a 20 6b 52 | 65 73 74 44 75 72 61 74 |= 9 * kR|estDurat|
|00002890| 69 6f 6e 3b 0d 09 72 65 | 74 75 72 6e 20 68 3b 0d |ion;..re|turn h;.|
|000028a0| 09 7d 0d 0d 0d 76 6f 69 | 64 20 42 75 69 6c 64 53 |.}...voi|d BuildS|
|000028b0| 65 71 75 65 6e 63 65 41 | 6e 64 50 6c 61 79 28 73 |equenceA|ndPlay(s|
|000028c0| 68 6f 72 74 20 78 78 31 | 2c 73 68 6f 72 74 20 78 |hort xx1|,short x|
|000028d0| 78 32 2c 73 68 6f 72 74 | 20 78 78 33 29 09 2f 2a |x2,short| xx3)./*|
|000028e0| 20 64 75 6d 6d 79 20 61 | 72 67 75 6d 65 6e 74 73 | dummy a|rguments|
|000028f0| 20 66 6f 72 20 62 69 67 | 20 65 61 73 79 20 73 68 | for big| easy sh|
|00002900| 65 6c 6c 20 2a 2f 0d 09 | 7b 0d 09 48 61 6e 64 6c |ell */..|{..Handl|
|00002910| 65 20 73 65 71 75 65 6e | 63 65 48 3b 0d 09 75 6e |e sequen|ceH;..un|
|00002920| 73 69 67 6e 65 64 20 6c | 6f 6e 67 20 2a 68 65 61 |signed l|ong *hea|
|00002930| 64 65 72 3b 0d 09 75 6e | 73 69 67 6e 65 64 20 6c |der;..un|signed l|
|00002940| 6f 6e 67 20 2a 73 65 71 | 75 65 6e 63 65 3b 0d 09 |ong *seq|uence;..|
|00002950| 54 75 6e 65 50 6c 61 79 | 65 72 20 74 70 3b 0d 09 |TunePlay|er tp;..|
|00002960| 54 75 6e 65 53 74 61 74 | 75 73 20 74 73 3b 0d 09 |TuneStat|us ts;..|
|00002970| 43 6f 6d 70 6f 6e 65 6e | 74 52 65 73 75 6c 74 20 |Componen|tResult |
|00002980| 74 68 69 73 45 72 72 6f | 72 3b 0d 0d 09 74 70 20 |thisErro|r;...tp |
|00002990| 3d 20 30 3b 0d 0d 09 68 | 65 61 64 65 72 20 3d 20 |= 0;...h|eader = |
|000029a0| 42 75 69 6c 64 54 75 6e | 65 48 65 61 64 65 72 28 |BuildTun|eHeader(|
|000029b0| 6e 69 6c 29 3b 0d 09 73 | 65 71 75 65 6e 63 65 48 |nil);..s|equenceH|
|000029c0| 20 3d 20 42 75 69 6c 64 | 54 75 6e 65 53 65 71 75 | = Build|TuneSequ|
|000029d0| 65 6e 63 65 28 6e 69 6c | 29 3b 0d 0d 09 69 66 28 |ence(nil|);...if(|
|000029e0| 21 73 65 71 75 65 6e 63 | 65 48 20 7c 7c 20 21 68 |!sequenc|eH || !h|
|000029f0| 65 61 64 65 72 29 0d 09 | 09 67 6f 74 6f 20 67 6f |eader)..|.goto go|
|00002a00| 48 6f 6d 65 3b 0d 0d 09 | 73 65 71 75 65 6e 63 65 |Home;...|sequence|
|00002a10| 20 3d 20 28 75 6e 73 69 | 67 6e 65 64 20 6c 6f 6e | = (unsi|gned lon|
|00002a20| 67 20 2a 29 2a 73 65 71 | 75 65 6e 63 65 48 3b 0d |g *)*seq|uenceH;.|
|00002a30| 0d 09 74 70 20 3d 20 4f | 70 65 6e 44 65 66 61 75 |..tp = O|penDefau|
|00002a40| 6c 74 43 6f 6d 70 6f 6e | 65 6e 74 28 6b 54 75 6e |ltCompon|ent(kTun|
|00002a50| 65 50 6c 61 79 65 72 54 | 79 70 65 2c 30 29 3b 0d |ePlayerT|ype,0);.|
|00002a60| 09 69 66 28 21 74 70 29 | 0d 09 09 67 6f 74 6f 20 |.if(!tp)|...goto |
|00002a70| 67 6f 48 6f 6d 65 3b 0d | 0d 09 74 68 69 73 45 72 |goHome;.|..thisEr|
|00002a80| 72 6f 72 20 3d 20 54 75 | 6e 65 53 65 74 48 65 61 |ror = Tu|neSetHea|
|00002a90| 64 65 72 28 74 70 2c 68 | 65 61 64 65 72 29 3b 0d |der(tp,h|eader);.|
|00002aa0| 0d 09 09 7b 0d 09 09 6c | 6f 6e 67 20 74 3b 0d 09 |...{...l|ong t;..|
|00002ab0| 09 44 65 6c 61 79 28 31 | 30 2c 26 74 29 3b 0d 09 |.Delay(1|0,&t);..|
|00002ac0| 09 7d 0d 0d 09 74 68 69 | 73 45 72 72 6f 72 20 3d |.}...thi|sError =|
|00002ad0| 20 54 75 6e 65 51 75 65 | 75 65 28 74 70 2c 73 65 | TuneQue|ue(tp,se|
|00002ae0| 71 75 65 6e 63 65 2c 30 | 78 30 30 30 31 30 30 30 |quence,0|x0001000|
|00002af0| 30 2c 30 2c 30 78 37 46 | 46 46 46 46 46 46 2c 30 |0,0,0x7F|FFFFFF,0|
|00002b00| 2c 30 2c 30 29 3b 0d 0d | 09 2f 2a 0d 09 20 2a 20 |,0,0);..|./*.. * |
|00002b10| 77 61 69 74 20 75 6e 74 | 69 6c 20 74 68 65 20 73 |wait unt|il the s|
|00002b20| 65 71 75 65 6e 63 65 20 | 66 69 6e 69 73 68 65 73 |equence |finishes|
|00002b30| 20 70 6c 61 79 69 6e 67 | 2c 0d 09 20 2a 20 6f 72 | playing|,.. * or|
|00002b40| 20 74 68 65 20 75 73 65 | 72 20 63 6c 69 63 6b 73 | the use|r clicks|
|00002b50| 20 74 68 65 20 6d 6f 75 | 73 65 2e 0d 09 20 2a 2f | the mou|se... */|
|00002b60| 0d 73 70 69 6e 3a 0d 09 | 74 68 69 73 45 72 72 6f |.spin:..|thisErro|
|00002b70| 72 20 3d 20 54 75 6e 65 | 47 65 74 53 74 61 74 75 |r = Tune|GetStatu|
|00002b80| 73 28 74 70 2c 26 74 73 | 29 3b 0d 09 69 66 28 74 |s(tp,&ts|);..if(t|
|00002b90| 73 2e 71 75 65 75 65 54 | 69 6d 65 20 26 26 20 21 |s.queueT|ime && !|
|00002ba0| 42 75 74 74 6f 6e 28 29 | 29 0d 09 09 67 6f 74 6f |Button()|)...goto|
|00002bb0| 20 73 70 69 6e 3b 09 2f | 2a 20 49 20 6c 69 6b 65 | spin;./|* I like|
|00002bc0| 20 74 6f 20 75 73 65 20 | 67 6f 74 6f 73 20 70 72 | to use |gotos pr|
|00002bd0| 69 6d 61 72 69 6c 79 20 | 74 6f 20 73 68 6f 63 6b |imarily |to shock|
|00002be0| 20 74 68 65 20 63 68 69 | 6c 64 72 65 6e 2e 20 2a | the chi|ldren. *|
|00002bf0| 2f 0d 0d 67 6f 48 6f 6d | 65 3a 0d 09 69 66 28 74 |/..goHom|e:..if(t|
|00002c00| 70 29 0d 09 09 43 6c 6f | 73 65 43 6f 6d 70 6f 6e |p)...Clo|seCompon|
|00002c10| 65 6e 74 28 74 70 29 3b | 0d 09 69 66 28 68 65 61 |ent(tp);|..if(hea|
|00002c20| 64 65 72 29 0d 09 09 44 | 69 73 70 6f 73 65 50 74 |der)...D|isposePt|
|00002c30| 72 28 28 50 74 72 29 68 | 65 61 64 65 72 29 3b 0d |r((Ptr)h|eader);.|
|00002c40| 09 69 66 28 73 65 71 75 | 65 6e 63 65 48 29 0d 09 |.if(sequ|enceH)..|
|00002c50| 09 44 69 73 70 6f 73 65 | 48 61 6e 64 6c 65 28 73 |.Dispose|Handle(s|
|00002c60| 65 71 75 65 6e 63 65 48 | 29 3b 0d 09 7d 0d 0d 0d |equenceH|);..}...|
|00002c70| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 0d 09 |typedef |struct..|
|00002c80| 7b 0d 09 4e 6f 74 65 41 | 6c 6c 6f 63 61 74 6f 72 |{..NoteA|llocator|
|00002c90| 20 6e 61 3b 0d 09 4e 6f | 74 65 43 68 61 6e 6e 65 | na;..No|teChanne|
|00002ca0| 6c 20 6e 63 3b 0d 09 7d | 20 4d 49 44 49 49 6e 70 |l nc;..}| MIDIInp|
|00002cb0| 75 74 45 78 61 6d 70 6c | 65 3b 0d 0d 70 61 73 63 |utExampl|e;..pasc|
|00002cc0| 61 6c 20 43 6f 6d 70 6f | 6e 65 6e 74 52 65 73 75 |al Compo|nentResu|
|00002cd0| 6c 74 20 41 52 65 61 64 | 48 6f 6f 6b 28 4d 75 73 |lt ARead|Hook(Mus|
|00002ce0| 69 63 4d 49 44 49 50 61 | 63 6b 65 74 20 2a 6d 70 |icMIDIPa|cket *mp|
|00002cf0| 2c 20 6c 6f 6e 67 20 72 | 65 66 43 6f 6e 29 3b 0d |, long r|efCon);.|
|00002d00| 70 61 73 63 61 6c 20 43 | 6f 6d 70 6f 6e 65 6e 74 |pascal C|omponent|
|00002d10| 52 65 73 75 6c 74 20 41 | 52 65 61 64 48 6f 6f 6b |Result A|ReadHook|
|00002d20| 28 4d 75 73 69 63 4d 49 | 44 49 50 61 63 6b 65 74 |(MusicMI|DIPacket|
|00002d30| 20 2a 6d 70 2c 20 6c 6f | 6e 67 20 72 65 66 43 6f | *mp, lo|ng refCo|
|00002d40| 6e 29 0d 09 7b 0d 09 4d | 49 44 49 49 6e 70 75 74 |n)..{..M|IDIInput|
|00002d50| 45 78 61 6d 70 6c 65 20 | 2a 6d 69 65 3b 0d 09 42 |Example |*mie;..B|
|00002d60| 6f 6f 6c 65 61 6e 20 6d | 61 6a 6f 72 3b 0d 09 73 |oolean m|ajor;..s|
|00002d70| 68 6f 72 74 20 73 74 61 | 74 75 73 2c 70 69 74 63 |hort sta|tus,pitc|
|00002d80| 68 2c 76 65 6c 3b 0d 0d | 09 6d 69 65 20 3d 20 28 |h,vel;..|.mie = (|
|00002d90| 4d 49 44 49 49 6e 70 75 | 74 45 78 61 6d 70 6c 65 |MIDIInpu|tExample|
|00002da0| 20 2a 29 72 65 66 43 6f | 6e 3b 0d 0d 2f 2f 09 69 | *)refCo|n;..//.i|
|00002db0| 66 28 6d 70 2d 3e 72 65 | 73 65 72 76 65 64 20 3d |f(mp->re|served =|
|00002dc0| 3d 20 6b 4d 75 73 69 63 | 50 61 63 6b 65 74 50 6f |= kMusic|PacketPo|
|00002dd0| 72 74 4c 6f 73 74 29 09 | 09 2f 2a 20 70 6f 72 74 |rtLost).|./* port|
|00002de0| 20 67 6f 6e 65 3f 20 6d | 61 6b 65 20 63 68 61 6e | gone? m|ake chan|
|00002df0| 6e 65 6c 20 71 75 69 65 | 74 20 2a 2f 0d 2f 2f 09 |nel quie|t */.//.|
|00002e00| 09 4e 41 53 65 74 4e 6f | 74 65 43 68 61 6e 6e 65 |.NASetNo|teChanne|
|00002e10| 6c 56 6f 6c 75 6d 65 28 | 6d 69 65 2d 3e 6e 61 2c |lVolume(|mie->na,|
|00002e20| 6d 69 65 2d 3e 6e 63 2c | 30 29 3b 0d 2f 2f 09 65 |mie->nc,|0);.//.e|
|00002e30| 6c 73 65 20 69 66 28 6d | 70 2d 3e 72 65 73 65 72 |lse if(m|p->reser|
|00002e40| 76 65 64 20 3d 3d 20 6b | 4d 75 73 69 63 50 61 63 |ved == k|MusicPac|
|00002e50| 6b 65 74 50 6f 72 74 46 | 6f 75 6e 64 29 09 2f 2a |ketPortF|ound)./*|
|00002e60| 20 70 6f 72 74 20 62 61 | 63 6b 3f 20 72 61 69 73 | port ba|ck? rais|
|00002e70| 65 20 76 6f 6c 75 6d 65 | 20 2a 2f 0d 2f 2f 09 09 |e volume| */.//..|
|00002e80| 4e 41 53 65 74 4e 6f 74 | 65 43 68 61 6e 6e 65 6c |NASetNot|eChannel|
|00002e90| 56 6f 6c 75 6d 65 28 6d | 69 65 2d 3e 6e 61 2c 6d |Volume(m|ie->na,m|
|00002ea0| 69 65 2d 3e 6e 63 2c 30 | 78 30 30 30 31 30 30 30 |ie->nc,0|x0001000|
|00002eb0| 30 29 3b 0d 2f 2f 09 65 | 6c 73 65 20 0d 09 69 66 |0);.//.e|lse ..if|
|00002ec0| 28 6d 70 2d 3e 6c 65 6e | 67 74 68 20 3d 3d 20 33 |(mp->len|gth == 3|
|00002ed0| 29 0d 09 09 7b 0d 09 09 | 73 74 61 74 75 73 20 3d |)...{...|status =|
|00002ee0| 20 6d 70 2d 3e 64 61 74 | 61 5b 30 5d 20 26 20 30 | mp->dat|a[0] & 0|
|00002ef0| 78 46 30 3b 0d 09 09 70 | 69 74 63 68 20 3d 20 6d |xF0;...p|itch = m|
|00002f00| 70 2d 3e 64 61 74 61 5b | 31 5d 3b 0d 09 09 76 65 |p->data[|1];...ve|
|00002f10| 6c 20 3d 20 6d 70 2d 3e | 64 61 74 61 5b 32 5d 3b |l = mp->|data[2];|
|00002f20| 0d 09 09 73 77 69 74 63 | 68 28 73 74 61 74 75 73 |...switc|h(status|
|00002f30| 29 0d 09 09 09 7b 0d 09 | 09 09 63 61 73 65 20 30 |)....{..|..case 0|
|00002f40| 78 38 30 3a 0d 09 09 09 | 09 76 65 6c 20 3d 20 30 |x80:....|.vel = 0|
|00002f50| 3b 0d 09 2f 2a 20 66 61 | 6c 6c 73 20 69 6e 74 6f |;../* fa|lls into|
|00002f60| 20 63 61 73 65 20 30 78 | 39 30 2e 20 41 6c 6d 6f | case 0x|90. Almo|
|00002f70| 73 74 20 61 73 20 66 75 | 6e 20 61 73 20 61 20 67 |st as fu|n as a g|
|00002f80| 6f 74 6f 2c 20 68 6d 6d | 2c 20 6d 6f 6d 3f 20 2a |oto, hmm|, mom? *|
|00002f90| 2f 0d 09 09 09 63 61 73 | 65 20 30 78 39 30 3a 0d |/....cas|e 0x90:.|
|00002fa0| 09 09 09 09 6d 61 6a 6f | 72 20 3d 20 70 69 74 63 |....majo|r = pitc|
|00002fb0| 68 20 25 20 35 20 3d 3d | 20 30 3b 0d 09 09 09 09 |h % 5 ==| 0;.....|
|00002fc0| 4e 41 50 6c 61 79 4e 6f | 74 65 28 6d 69 65 2d 3e |NAPlayNo|te(mie->|
|00002fd0| 6e 61 2c 6d 69 65 2d 3e | 6e 63 2c 70 69 74 63 68 |na,mie->|nc,pitch|
|00002fe0| 2c 76 65 6c 29 3b 0d 09 | 09 09 09 4e 41 50 6c 61 |,vel);..|...NAPla|
|00002ff0| 79 4e 6f 74 65 28 6d 69 | 65 2d 3e 6e 61 2c 6d 69 |yNote(mi|e->na,mi|
|00003000| 65 2d 3e 6e 63 2c 70 69 | 74 63 68 2b 33 2b 6d 61 |e->nc,pi|tch+3+ma|
|00003010| 6a 6f 72 2c 76 65 6c 29 | 3b 0d 09 09 09 09 4e 41 |jor,vel)|;.....NA|
|00003020| 50 6c 61 79 4e 6f 74 65 | 28 6d 69 65 2d 3e 6e 61 |PlayNote|(mie->na|
|00003030| 2c 6d 69 65 2d 3e 6e 63 | 2c 70 69 74 63 68 2b 37 |,mie->nc|,pitch+7|
|00003040| 2c 76 65 6c 29 3b 0d 09 | 09 09 09 62 72 65 61 6b |,vel);..|...break|
|00003050| 3b 0d 09 09 09 7d 0d 09 | 09 7d 0d 09 72 65 74 75 |;....}..|.}..retu|
|00003060| 72 6e 20 6e 6f 45 72 72 | 3b 0d 09 7d 0d 0d 0d 76 |rn noErr|;..}...v|
|00003070| 6f 69 64 20 55 73 65 4d | 49 44 49 49 6e 70 75 74 |oid UseM|IDIInput|
|00003080| 28 73 68 6f 72 74 20 78 | 78 31 2c 73 68 6f 72 74 |(short x|x1,short|
|00003090| 20 78 78 32 2c 73 68 6f | 72 74 20 78 78 33 29 0d | xx2,sho|rt xx3).|
|000030a0| 09 7b 0d 09 43 6f 6d 70 | 6f 6e 65 6e 74 52 65 73 |.{..Comp|onentRes|
|000030b0| 75 6c 74 20 72 65 73 75 | 6c 74 3b 0d 09 4d 49 44 |ult resu|lt;..MID|
|000030c0| 49 49 6e 70 75 74 45 78 | 61 6d 70 6c 65 20 6d 69 |IInputEx|ample mi|
|000030d0| 65 3b 0d 09 4e 6f 74 65 | 52 65 71 75 65 73 74 20 |e;..Note|Request |
|000030e0| 6e 72 3b 0d 09 4d 75 73 | 69 63 4d 49 44 49 52 65 |nr;..Mus|icMIDIRe|
|000030f0| 61 64 48 6f 6f 6b 55 50 | 50 20 72 65 61 64 48 6f |adHookUP|P readHo|
|00003100| 6f 6b 55 50 50 20 3d 20 | 6e 69 6c 3b 0d 0d 09 6d |okUPP = |nil;...m|
|00003110| 69 65 2e 6e 61 20 3d 20 | 4f 70 65 6e 44 65 66 61 |ie.na = |OpenDefa|
|00003120| 75 6c 74 43 6f 6d 70 6f | 6e 65 6e 74 28 27 6e 6f |ultCompo|nent('no|
|00003130| 74 61 27 2c 30 29 3b 0d | 09 69 66 28 21 6d 69 65 |ta',0);.|.if(!mie|
|00003140| 2e 6e 61 29 0d 09 09 67 | 6f 74 6f 20 67 6f 48 6f |.na)...g|oto goHo|
|00003150| 6d 65 3b 0d 0d 09 6e 72 | 2e 70 6f 6c 79 70 68 6f |me;...nr|.polypho|
|00003160| 6e 79 20 3d 20 32 3b 0d | 09 6e 72 2e 74 79 70 69 |ny = 2;.|.nr.typi|
|00003170| 63 61 6c 50 6f 6c 79 70 | 68 6f 6e 79 20 3d 20 30 |calPolyp|hony = 0|
|00003180| 78 30 30 30 31 30 30 30 | 30 3b 0d 09 72 65 73 75 |x0001000|0;..resu|
|00003190| 6c 74 20 3d 20 4e 41 53 | 74 75 66 66 54 6f 6e 65 |lt = NAS|tuffTone|
|000031a0| 44 65 73 63 72 69 70 74 | 69 6f 6e 28 6d 69 65 2e |Descript|ion(mie.|
|000031b0| 6e 61 2c 31 2c 26 6e 72 | 2e 74 6f 6e 65 29 3b 09 |na,1,&nr|.tone);.|
|000031c0| 09 2f 2a 20 70 69 61 6e | 6f 20 2a 2f 0d 09 72 65 |./* pian|o */..re|
|000031d0| 73 75 6c 74 20 3d 20 4e | 41 4e 65 77 4e 6f 74 65 |sult = N|ANewNote|
|000031e0| 43 68 61 6e 6e 65 6c 28 | 6d 69 65 2e 6e 61 2c 26 |Channel(|mie.na,&|
|000031f0| 6e 72 2c 26 6d 69 65 2e | 6e 63 29 3b 0d 09 0d 09 |nr,&mie.|nc);....|
|00003200| 72 65 61 64 48 6f 6f 6b | 55 50 50 20 3d 20 4e 65 |readHook|UPP = Ne|
|00003210| 77 4d 75 73 69 63 4d 49 | 44 49 52 65 61 64 48 6f |wMusicMI|DIReadHo|
|00003220| 6f 6b 50 72 6f 63 28 41 | 52 65 61 64 48 6f 6f 6b |okProc(A|ReadHook|
|00003230| 29 3b 0d 09 72 65 73 75 | 6c 74 20 3d 20 4e 41 55 |);..resu|lt = NAU|
|00003240| 73 65 44 65 66 61 75 6c | 74 4d 49 44 49 49 6e 70 |seDefaul|tMIDIInp|
|00003250| 75 74 28 6d 69 65 2e 6e | 61 2c 72 65 61 64 48 6f |ut(mie.n|a,readHo|
|00003260| 6f 6b 55 50 50 2c 28 6c | 6f 6e 67 29 26 6d 69 65 |okUPP,(l|ong)&mie|
|00003270| 2c 30 29 3b 0d 09 77 68 | 69 6c 65 28 21 42 75 74 |,0);..wh|ile(!But|
|00003280| 74 6f 6e 28 29 29 3b 0d | 09 72 65 73 75 6c 74 20 |ton());.|.result |
|00003290| 3d 20 4e 41 4c 6f 73 65 | 44 65 66 61 75 6c 74 4d |= NALose|DefaultM|
|000032a0| 49 44 49 49 6e 70 75 74 | 28 6d 69 65 2e 6e 61 29 |IDIInput|(mie.na)|
|000032b0| 3b 0d 0d 67 6f 48 6f 6d | 65 3a 0d 09 69 66 28 72 |;..goHom|e:..if(r|
|000032c0| 65 61 64 48 6f 6f 6b 55 | 50 50 29 0d 09 09 44 69 |eadHookU|PP)...Di|
|000032d0| 73 70 6f 73 65 52 6f 75 | 74 69 6e 65 44 65 73 63 |sposeRou|tineDesc|
|000032e0| 72 69 70 74 6f 72 28 72 | 65 61 64 48 6f 6f 6b 55 |riptor(r|eadHookU|
|000032f0| 50 50 29 3b 0d 09 69 66 | 28 6d 69 65 2e 6e 61 29 |PP);..if|(mie.na)|
|00003300| 0d 09 09 43 6c 6f 73 65 | 43 6f 6d 70 6f 6e 65 6e |...Close|Componen|
|00003310| 74 28 6d 69 65 2e 6e 61 | 29 3b 09 09 2f 2a 20 64 |t(mie.na|);../* d|
|00003320| 69 73 70 6f 73 65 73 20 | 6e 6f 74 65 63 68 61 6e |isposes |notechan|
|00003330| 6e 65 6c 20 74 6f 6f 20 | 2a 2f 0d 09 7d 0d 0d 0d |nel too |*/..}...|
|00003340| 0d 0d 76 6f 69 64 20 42 | 75 69 6c 64 4d 75 73 69 |..void B|uildMusi|
|00003350| 63 4d 6f 76 69 65 28 73 | 68 6f 72 74 20 78 78 31 |cMovie(s|hort xx1|
|00003360| 2c 73 68 6f 72 74 20 78 | 78 32 2c 73 68 6f 72 74 |,short x|x2,short|
|00003370| 20 78 78 33 29 09 2f 2a | 20 64 75 6d 6d 79 20 61 | xx3)./*| dummy a|
|00003380| 72 67 75 6d 65 6e 74 73 | 20 66 6f 72 20 62 69 67 |rguments| for big|
|00003390| 20 65 61 73 79 20 73 68 | 65 6c 6c 20 2a 2f 0d 09 | easy sh|ell */..|
|000033a0| 7b 0d 09 43 6f 6d 70 6f | 6e 65 6e 74 52 65 73 75 |{..Compo|nentResu|
|000033b0| 6c 74 20 72 65 73 75 6c | 74 3b 0d 09 53 74 61 6e |lt resul|t;..Stan|
|000033c0| 64 61 72 64 46 69 6c 65 | 52 65 70 6c 79 20 72 65 |dardFile|Reply re|
|000033d0| 70 6c 79 3b 0d 09 73 68 | 6f 72 74 20 72 65 73 52 |ply;..sh|ort resR|
|000033e0| 65 66 4e 75 6d 3b 0d 09 | 4d 6f 76 69 65 20 6d 6f |efNum;..|Movie mo|
|000033f0| 3b 0d 09 54 72 61 63 6b | 20 74 72 3b 0d 09 4d 65 |;..Track| tr;..Me|
|00003400| 64 69 61 20 6d 65 3b 0d | 09 4d 75 73 69 63 44 65 |dia me;.|.MusicDe|
|00003410| 73 63 72 69 70 74 69 6f | 6e 20 2a 6d 64 2c 2a 2a |scriptio|n *md,**|
|00003420| 6d 64 48 3b 0d 09 6c 6f | 6e 67 20 64 75 72 61 74 |mdH;..lo|ng durat|
|00003430| 69 6f 6e 2c 68 65 61 64 | 65 72 4c 65 6e 67 74 68 |ion,head|erLength|
|00003440| 3b 0d 09 75 6e 73 69 67 | 6e 65 64 20 6c 6f 6e 67 |;..unsig|ned long|
|00003450| 20 2a 77 2c 2a 68 65 61 | 64 65 72 3b 0d 09 48 61 | *w,*hea|der;..Ha|
|00003460| 6e 64 6c 65 20 74 75 6e | 65 48 3b 0d 0d 09 2f 2f |ndle tun|eH;...//|
|00003470| 20 a5 20 70 72 6f 6d 70 | 74 20 75 73 65 72 20 66 | . promp|t user f|
|00003480| 6f 72 20 6e 65 77 20 66 | 69 6c 65 20 6e 61 6d 65 |or new f|ile name|
|00003490| 0d 0d 09 53 74 61 6e 64 | 61 72 64 50 75 74 46 69 |...Stand|ardPutFi|
|000034a0| 6c 65 20 28 22 5c 70 4d | 75 73 69 63 20 6d 6f 76 |le ("\pM|usic mov|
|000034b0| 69 65 20 66 69 6c 65 20 | 6e 61 6d 65 3a 22 2c 20 |ie file |name:", |
|000034c0| 22 5c 70 4d 6f 76 69 65 | 20 46 69 6c 65 22 2c 20 |"\pMovie| File", |
|000034d0| 26 72 65 70 6c 79 20 29 | 3b 0d 09 69 66 28 21 72 |&reply )|;..if(!r|
|000034e0| 65 70 6c 79 2e 73 66 47 | 6f 6f 64 29 0d 09 09 67 |eply.sfG|ood)...g|
|000034f0| 6f 74 6f 20 67 6f 48 6f | 6d 65 3b 0d 0d 09 2f 2f |oto goHo|me;...//|
|00003500| 20 a5 20 63 72 65 61 74 | 65 20 74 68 65 20 6d 6f | . creat|e the mo|
|00003510| 76 69 65 2c 20 61 6e 64 | 20 74 72 61 63 6b 2c 20 |vie, and| track, |
|00003520| 61 6e 64 20 6d 65 64 69 | 61 0d 0d 09 72 65 73 75 |and medi|a...resu|
|00003530| 6c 74 20 3d 20 43 72 65 | 61 74 65 4d 6f 76 69 65 |lt = Cre|ateMovie|
|00003540| 46 69 6c 65 28 26 72 65 | 70 6c 79 2e 73 66 46 69 |File(&re|ply.sfFi|
|00003550| 6c 65 2c 27 54 56 4f 44 | 27 2c 73 6d 43 75 72 72 |le,'TVOD|',smCurr|
|00003560| 65 6e 74 53 63 72 69 70 | 74 2c 63 72 65 61 74 65 |entScrip|t,create|
|00003570| 4d 6f 76 69 65 46 69 6c | 65 44 65 6c 65 74 65 43 |MovieFil|eDeleteC|
|00003580| 75 72 46 69 6c 65 2c 26 | 72 65 73 52 65 66 4e 75 |urFile,&|resRefNu|
|00003590| 6d 2c 26 6d 6f 29 3b 0d | 09 74 72 20 3d 20 4e 65 |m,&mo);.|.tr = Ne|
|000035a0| 77 4d 6f 76 69 65 54 72 | 61 63 6b 28 6d 6f 2c 30 |wMovieTr|ack(mo,0|
|000035b0| 2c 30 2c 32 35 36 29 3b | 0d 09 6d 65 20 3d 20 4e |,0,256);|..me = N|
|000035c0| 65 77 54 72 61 63 6b 4d | 65 64 69 61 28 74 72 2c |ewTrackM|edia(tr,|
|000035d0| 4d 75 73 69 63 4d 65 64 | 69 61 54 79 70 65 2c 20 |MusicMed|iaType, |
|000035e0| 36 30 30 2c 20 6e 69 6c | 2c 20 30 20 29 3b 0d 0d |600, nil|, 0 );..|
|000035f0| 09 2f 2f 20 a5 20 63 72 | 65 61 74 65 20 61 20 6d |.// . cr|eate a m|
|00003600| 75 73 69 63 20 73 61 6d | 70 6c 65 20 64 65 73 63 |usic sam|ple desc|
|00003610| 72 69 70 74 69 6f 6e 0d | 0d 09 68 65 61 64 65 72 |ription.|..header|
|00003620| 20 3d 20 42 75 69 6c 64 | 54 75 6e 65 48 65 61 64 | = Build|TuneHead|
|00003630| 65 72 28 26 68 65 61 64 | 65 72 4c 65 6e 67 74 68 |er(&head|erLength|
|00003640| 29 3b 0d 0d 09 6d 64 48 | 20 3d 20 28 4d 75 73 69 |);...mdH| = (Musi|
|00003650| 63 44 65 73 63 72 69 70 | 74 69 6f 6e 20 2a 2a 29 |cDescrip|tion **)|
|00003660| 4e 65 77 48 61 6e 64 6c | 65 43 6c 65 61 72 28 73 |NewHandl|eClear(s|
|00003670| 69 7a 65 6f 66 28 4d 75 | 73 69 63 44 65 73 63 72 |izeof(Mu|sicDescr|
|00003680| 69 70 74 69 6f 6e 29 20 | 2d 20 34 0d 09 09 09 2b |iption) |- 4....+|
|00003690| 20 68 65 61 64 65 72 4c | 65 6e 67 74 68 2a 73 69 | headerL|ength*si|
|000036a0| 7a 65 6f 66 28 6c 6f 6e | 67 29 0d 09 09 09 2b 20 |zeof(lon|g)....+ |
|000036b0| 34 29 3b 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |4);.....|........|
|000036c0| 2f 2a 20 65 6e 64 20 6d | 61 72 6b 65 72 20 2a 2f |/* end m|arker */|
|000036d0| 0d 09 69 66 28 21 6d 64 | 48 29 0d 09 09 67 6f 74 |..if(!md|H)...got|
|000036e0| 6f 20 67 6f 48 6f 6d 65 | 3b 0d 0d 09 6d 64 20 3d |o goHome|;...md =|
|000036f0| 20 2a 6d 64 48 3b 0d 09 | 6d 64 2d 3e 64 65 73 63 | *mdH;..|md->desc|
|00003700| 53 69 7a 65 20 3d 20 47 | 65 74 48 61 6e 64 6c 65 |Size = G|etHandle|
|00003710| 53 69 7a 65 28 28 48 61 | 6e 64 6c 65 29 6d 64 48 |Size((Ha|ndle)mdH|
|00003720| 29 3b 0d 09 6d 64 2d 3e | 64 61 74 61 46 6f 72 6d |);..md->|dataForm|
|00003730| 61 74 20 3d 20 27 6d 75 | 73 69 27 3b 0d 09 77 20 |at = 'mu|si';..w |
|00003740| 3d 20 6d 64 2d 3e 68 65 | 61 64 65 72 44 61 74 61 |= md->he|aderData|
|00003750| 3b 0d 09 42 6c 6f 63 6b | 4d 6f 76 65 28 68 65 61 |;..Block|Move(hea|
|00003760| 64 65 72 2c 77 2c 68 65 | 61 64 65 72 4c 65 6e 67 |der,w,he|aderLeng|
|00003770| 74 68 20 2a 20 73 69 7a | 65 6f 66 28 6c 6f 6e 67 |th * siz|eof(long|
|00003780| 29 29 3b 0d 09 77 20 2b | 3d 20 68 65 61 64 65 72 |));..w +|= header|
|00003790| 4c 65 6e 67 74 68 3b 0d | 09 2a 77 20 3d 20 30 78 |Length;.|.*w = 0x|
|000037a0| 36 30 30 30 30 30 30 30 | 3b 0d 0d 09 44 69 73 70 |60000000|;...Disp|
|000037b0| 6f 73 65 50 74 72 28 28 | 50 74 72 29 68 65 61 64 |osePtr((|Ptr)head|
|000037c0| 65 72 29 3b 0d 0d 09 2f | 2f 20 a5 20 47 65 74 20 |er);.../|/ . Get |
|000037d0| 61 20 74 75 6e 65 2c 20 | 61 6e 64 20 61 64 64 20 |a tune, |and add |
|000037e0| 69 74 20 74 6f 20 74 68 | 65 20 6d 65 64 69 61 2c |it to th|e media,|
|000037f0| 20 74 68 65 6e 20 66 69 | 6e 69 73 68 20 75 70 2e | then fi|nish up.|
|00003800| 0d 0d 09 74 75 6e 65 48 | 20 3d 20 42 75 69 6c 64 |...tuneH| = Build|
|00003810| 54 75 6e 65 53 65 71 75 | 65 6e 63 65 28 26 64 75 |TuneSequ|ence(&du|
|00003820| 72 61 74 69 6f 6e 29 3b | 0d 0d 09 72 65 73 75 6c |ration);|...resul|
|00003830| 74 20 3d 20 42 65 67 69 | 6e 4d 65 64 69 61 45 64 |t = Begi|nMediaEd|
|00003840| 69 74 73 28 6d 65 29 3b | 0d 0d 09 72 65 73 75 6c |its(me);|...resul|
|00003850| 74 20 3d 20 41 64 64 4d | 65 64 69 61 53 61 6d 70 |t = AddM|ediaSamp|
|00003860| 6c 65 28 6d 65 2c 74 75 | 6e 65 48 2c 30 2c 0d 09 |le(me,tu|neH,0,..|
|00003870| 09 09 47 65 74 48 61 6e | 64 6c 65 53 69 7a 65 28 |..GetHan|dleSize(|
|00003880| 74 75 6e 65 48 29 2c 0d | 09 09 09 64 75 72 61 74 |tuneH),.|...durat|
|00003890| 69 6f 6e 2c 28 53 61 6d | 70 6c 65 44 65 73 63 72 |ion,(Sam|pleDescr|
|000038a0| 69 70 74 69 6f 6e 48 61 | 6e 64 6c 65 29 6d 64 48 |iptionHa|ndle)mdH|
|000038b0| 2c 0d 09 09 09 31 2c 30 | 2c 6e 69 6c 29 3b 0d 0d |,....1,0|,nil);..|
|000038c0| 09 72 65 73 75 6c 74 20 | 3d 20 45 6e 64 4d 65 64 |.result |= EndMed|
|000038d0| 69 61 45 64 69 74 73 28 | 6d 65 29 3b 0d 09 72 65 |iaEdits(|me);..re|
|000038e0| 73 75 6c 74 20 3d 20 49 | 6e 73 65 72 74 4d 65 64 |sult = I|nsertMed|
|000038f0| 69 61 49 6e 74 6f 54 72 | 61 63 6b 28 74 72 2c 30 |iaIntoTr|ack(tr,0|
|00003900| 2c 30 2c 64 75 72 61 74 | 69 6f 6e 2c 28 31 4c 3c |,0,durat|ion,(1L<|
|00003910| 3c 31 36 29 29 3b 0d 0d | 09 72 65 73 75 6c 74 20 |<16));..|.result |
|00003920| 3d 20 4f 70 65 6e 4d 6f | 76 69 65 46 69 6c 65 28 |= OpenMo|vieFile(|
|00003930| 26 72 65 70 6c 79 2e 73 | 66 46 69 6c 65 2c 20 26 |&reply.s|fFile, &|
|00003940| 72 65 73 52 65 66 4e 75 | 6d 2c 0d 09 09 09 66 73 |resRefNu|m,....fs|
|00003950| 52 64 57 72 50 65 72 6d | 29 3b 0d 09 72 65 73 75 |RdWrPerm|);..resu|
|00003960| 6c 74 20 3d 20 41 64 64 | 4d 6f 76 69 65 52 65 73 |lt = Add|MovieRes|
|00003970| 6f 75 72 63 65 28 20 6d | 6f 2c 72 65 73 52 65 66 |ource( m|o,resRef|
|00003980| 4e 75 6d 2c 20 30 2c 20 | 30 29 3b 0d 09 72 65 73 |Num, 0, |0);..res|
|00003990| 75 6c 74 20 3d 20 43 6c | 6f 73 65 4d 6f 76 69 65 |ult = Cl|oseMovie|
|000039a0| 46 69 6c 65 28 72 65 73 | 52 65 66 4e 75 6d 29 3b |File(res|RefNum);|
|000039b0| 0d 0d 09 44 69 73 70 6f | 73 65 4d 6f 76 69 65 28 |...Dispo|seMovie(|
|000039c0| 6d 6f 29 3b 0d 67 6f 48 | 6f 6d 65 3a 3b 0d 09 7d |mo);.goH|ome:;..}|
|000039d0| 0d 0d 0d 76 6f 69 64 20 | 47 6f 41 77 61 79 44 6f |...void |GoAwayDo|
|000039e0| 63 28 73 68 6f 72 74 20 | 6e 29 0d 2f 2a 0d 20 2a |c(short |n)./*. *|
|000039f0| 20 43 6c 6f 73 65 20 74 | 68 61 74 20 77 69 6e 64 | Close t|hat wind|
|00003a00| 6f 77 2e 2e 2e 0d 20 2a | 2f 0d 09 7b 0d 09 55 6e |ow.... *|/..{..Un|
|00003a10| 69 6e 73 74 61 6c 6c 57 | 69 6e 64 6f 77 28 6e 29 |installW|indow(n)|
|00003a20| 3b 0d 09 7d 0d 0d 76 6f | 69 64 20 41 63 74 69 76 |;..}..vo|id Activ|
|00003a30| 61 74 65 44 6f 63 28 73 | 68 6f 72 74 20 6e 29 0d |ateDoc(s|hort n).|
|00003a40| 09 7b 0d 23 70 72 61 67 | 6d 61 20 75 6e 75 73 65 |.{.#prag|ma unuse|
|00003a50| 64 20 28 6e 29 0d 20 09 | 53 65 74 4d 65 6e 75 49 |d (n). .|SetMenuI|
|00003a60| 74 65 6d 28 6d 43 6c 6f | 73 65 2c 31 2c 30 2c 30 |tem(mClo|se,1,0,0|
|00003a70| 2c 6e 69 6c 29 3b 09 09 | 09 09 2f 2a 20 65 6e 61 |,nil);..|../* ena|
|00003a80| 62 6c 65 20 22 43 6c 6f | 73 65 22 20 6d 65 6e 75 |ble "Clo|se" menu|
|00003a90| 20 69 74 65 6d 09 09 2a | 2f 0d 09 53 65 74 4d 65 | item..*|/..SetMe|
|00003aa0| 6e 75 49 74 65 6d 28 6d | 4f 70 65 6e 2c 2d 31 2c |nuItem(m|Open,-1,|
|00003ab0| 30 2c 30 2c 6e 69 6c 29 | 3b 09 09 09 09 2f 2a 20 |0,0,nil)|;..../* |
|00003ac0| 64 69 73 61 62 6c 65 20 | 22 4f 70 65 6e 22 20 6d |disable |"Open" m|
|00003ad0| 65 6e 75 20 69 74 65 6d | 09 09 2a 2f 0d 09 7d 0d |enu item|..*/..}.|
|00003ae0| 0d 76 6f 69 64 20 44 65 | 61 63 74 69 76 61 74 65 |.void De|activate|
|00003af0| 44 6f 63 28 73 68 6f 72 | 74 20 6e 29 0d 09 7b 0d |Doc(shor|t n)..{.|
|00003b00| 23 70 72 61 67 6d 61 20 | 75 6e 75 73 65 64 20 28 |#pragma |unused (|
|00003b10| 6e 29 0d 09 53 65 74 4d | 65 6e 75 49 74 65 6d 28 |n)..SetM|enuItem(|
|00003b20| 6d 43 6c 6f 73 65 2c 2d | 31 2c 30 2c 30 2c 6e 69 |mClose,-|1,0,0,ni|
|00003b30| 6c 29 3b 09 09 09 09 2f | 2a 20 64 69 73 61 62 6c |l);..../|* disabl|
|00003b40| 65 20 22 43 6c 6f 73 65 | 22 20 6d 65 6e 75 20 69 |e "Close|" menu i|
|00003b50| 74 65 6d 09 2a 2f 0d 09 | 53 65 74 4d 65 6e 75 49 |tem.*/..|SetMenuI|
|00003b60| 74 65 6d 28 6d 4f 70 65 | 6e 2c 31 2c 30 2c 30 2c |tem(mOpe|n,1,0,0,|
|00003b70| 6e 69 6c 29 3b 09 09 09 | 09 2f 2a 20 65 6e 61 62 |nil);...|./* enab|
|00003b80| 6c 65 20 22 4f 70 65 6e | 22 20 6d 65 6e 75 20 69 |le "Open|" menu i|
|00003b90| 74 65 6d 09 09 2a 2f 0d | 09 7d 0d 0d 76 6f 69 64 |tem..*/.|.}..void|
|00003ba0| 20 4c 65 74 73 51 75 69 | 74 28 73 68 6f 72 74 20 | LetsQui|t(short |
|00003bb0| 6e 2c 73 68 6f 72 74 20 | 6d 65 6e 75 49 74 65 6d |n,short |menuItem|
|00003bc0| 2c 73 68 6f 72 74 20 6d | 65 6e 75 52 65 66 29 0d |,short m|enuRef).|
|00003bd0| 09 7b 0d 23 70 72 61 67 | 6d 61 20 75 6e 75 73 65 |.{.#prag|ma unuse|
|00003be0| 64 20 28 6e 2c 6d 65 6e | 75 49 74 65 6d 2c 6d 65 |d (n,men|uItem,me|
|00003bf0| 6e 75 52 65 66 29 0d 09 | 67 51 75 69 74 41 70 70 |nuRef)..|gQuitApp|
|00003c00| 2b 2b 3b 0d 09 7d 0d 0d | 23 64 65 66 69 6e 65 20 |++;..}..|#define |
|00003c10| 6b 57 69 6e 64 6f 77 57 | 69 64 74 68 20 32 30 30 |kWindowW|idth 200|
|00003c20| 0d 23 64 65 66 69 6e 65 | 20 6b 57 69 6e 64 6f 77 |.#define| kWindow|
|00003c30| 48 65 69 67 68 74 20 31 | 30 30 0d 0d 76 6f 69 64 |Height 1|00..void|
|00003c40| 20 4f 70 65 6e 57 69 6e | 64 6f 77 28 73 68 6f 72 | OpenWin|dow(shor|
|00003c50| 74 20 6e 2c 73 68 6f 72 | 74 20 6d 65 6e 75 49 74 |t n,shor|t menuIt|
|00003c60| 65 6d 2c 73 68 6f 72 74 | 20 6d 65 6e 75 52 65 66 |em,short| menuRef|
|00003c70| 29 0d 09 7b 0d 23 70 72 | 61 67 6d 61 20 75 6e 75 |)..{.#pr|agma unu|
|00003c80| 73 65 64 20 28 6e 2c 6d | 65 6e 75 49 74 65 6d 2c |sed (n,m|enuItem,|
|00003c90| 6d 65 6e 75 52 65 66 29 | 0d 09 52 65 63 74 20 72 |menuRef)|..Rect r|
|00003ca0| 3b 0d 0d 09 53 65 74 52 | 65 63 74 28 26 72 2c 30 |;...SetR|ect(&r,0|
|00003cb0| 2c 30 2c 6b 57 69 6e 64 | 6f 77 57 69 64 74 68 2c |,0,kWind|owWidth,|
|00003cc0| 6b 57 69 6e 64 6f 77 48 | 65 69 67 68 74 29 3b 0d |kWindowH|eight);.|
|00003cd0| 09 4f 66 66 73 65 74 52 | 65 63 74 28 26 72 2c 32 |.OffsetR|ect(&r,2|
|00003ce0| 30 2c 34 30 29 3b 0d 0d | 09 67 2e 77 20 3d 20 49 |0,40);..|.g.w = I|
|00003cf0| 6e 73 74 61 6c 6c 57 69 | 6e 64 6f 77 28 31 2c 22 |nstallWi|ndow(1,"|
|00003d00| 5c 70 22 2c 26 72 2c 30 | 2c 77 43 6f 70 79 44 72 |\p",&r,0|,wCopyDr|
|00003d10| 61 77 2c 0d 09 09 09 09 | 09 09 09 09 53 44 72 61 |aw,.....|....SDra|
|00003d20| 77 44 6f 63 2c 53 43 6c | 69 63 6b 44 6f 63 2c 53 |wDoc,SCl|ickDoc,S|
|00003d30| 4b 65 79 44 6f 63 2c 6e | 69 6c 2c 0d 09 09 09 09 |KeyDoc,n|il,.....|
|00003d40| 09 09 09 09 41 63 74 69 | 76 61 74 65 44 6f 63 2c |....Acti|vateDoc,|
|00003d50| 44 65 61 63 74 69 76 61 | 74 65 44 6f 63 2c 53 49 |Deactiva|teDoc,SI|
|00003d60| 64 6c 65 44 6f 63 29 3b | 0d 09 7d 0d 0d 73 74 61 |dleDoc);|..}..sta|
|00003d70| 74 69 63 20 76 6f 69 64 | 20 53 44 72 61 77 44 6f |tic void| SDrawDo|
|00003d80| 63 28 73 68 6f 72 74 20 | 6e 29 0d 09 7b 0d 09 45 |c(short |n)..{..E|
|00003d90| 72 61 73 65 52 65 63 74 | 28 26 67 42 69 67 52 65 |raseRect|(&gBigRe|
|00003da0| 63 74 29 3b 0d 09 4d 6f | 76 65 54 6f 28 31 30 2c |ct);..Mo|veTo(10,|
|00003db0| 35 30 29 3b 0d 09 44 72 | 61 77 53 74 72 69 6e 67 |50);..Dr|awString|
|00003dc0| 28 22 5c 70 45 78 61 6d | 70 6c 65 73 20 6f 66 20 |("\pExam|ples of |
|00003dd0| 51 75 69 63 6b 54 69 6d | 65 20 4d 75 73 69 63 20 |QuickTim|e Music |
|00003de0| 41 72 63 68 69 74 65 63 | 74 75 72 65 22 29 3b 0d |Architec|ture");.|
|00003df0| 09 4d 6f 76 65 54 6f 28 | 31 30 2c 36 35 29 3b 0d |.MoveTo(|10,65);.|
|00003e00| 09 44 72 61 77 53 74 72 | 69 6e 67 28 22 5c 70 44 |.DrawStr|ing("\pD|
|00003e10| 61 76 69 64 20 56 61 6e | 20 42 72 69 6e 6b 2c 20 |avid Van| Brink, |
|00003e20| 31 39 39 35 22 29 3b 0d | 09 4d 6f 76 65 54 6f 28 |1995");.|.MoveTo(|
|00003e30| 31 30 2c 38 30 29 3b 0d | 09 44 72 61 77 53 74 72 |10,80);.|.DrawStr|
|00003e40| 69 6e 67 28 22 5c 70 a9 | 41 70 70 6c 65 20 43 6f |ing("\p.|Apple Co|
|00003e50| 6d 70 75 74 65 72 22 29 | 3b 0d 09 7d 0d 0d 73 74 |mputer")|;..}..st|
|00003e60| 61 74 69 63 20 76 6f 69 | 64 20 53 43 6c 69 63 6b |atic voi|d SClick|
|00003e70| 44 6f 63 28 73 68 6f 72 | 74 20 6e 2c 50 6f 69 6e |Doc(shor|t n,Poin|
|00003e80| 74 20 70 2c 73 68 6f 72 | 74 20 6d 6f 64 73 29 0d |t p,shor|t mods).|
|00003e90| 09 7b 0d 09 7d 0d 0d 73 | 74 61 74 69 63 20 76 6f |.{..}..s|tatic vo|
|00003ea0| 69 64 20 53 4b 65 79 44 | 6f 63 28 73 68 6f 72 74 |id SKeyD|oc(short|
|00003eb0| 20 6e 2c 73 68 6f 72 74 | 20 6b 65 79 2c 73 68 6f | n,short| key,sho|
|00003ec0| 72 74 20 63 6f 64 65 2c | 73 68 6f 72 74 20 6d 6f |rt code,|short mo|
|00003ed0| 64 73 29 0d 09 7b 0d 09 | 7d 0d 0d 73 74 61 74 69 |ds)..{..|}..stati|
|00003ee0| 63 20 76 6f 69 64 20 53 | 49 64 6c 65 44 6f 63 28 |c void S|IdleDoc(|
|00003ef0| 73 68 6f 72 74 20 6e 2c | 20 42 6f 6f 6c 65 61 6e |short n,| Boolean|
|00003f00| 20 66 72 6f 6e 74 29 0d | 09 7b 0d 09 7d 0d 0d 0d | front).|.{..}...|
|00003f10| 0d 0d 0d 76 6f 69 64 20 | 49 6e 69 74 56 61 72 73 |...void |InitVars|
|00003f20| 28 29 0d 2f 2a 0d 20 2a | 20 43 61 6c 6c 65 64 20 |()./*. *| Called |
|00003f30| 6f 6e 63 65 20 61 74 20 | 73 74 61 72 74 75 70 3a |once at |startup:|
|00003f40| 20 79 65 73 2c 20 69 74 | 0d 20 2a 20 69 6e 69 74 | yes, it|. * init|
|00003f50| 73 20 74 68 65 20 76 61 | 72 73 2e 0d 20 2a 2f 0d |s the va|rs.. */.|
|00003f60| 09 7b 0d 09 45 6e 74 65 | 72 4d 6f 76 69 65 73 28 |.{..Ente|rMovies(|
|00003f70| 29 3b 0d 09 7d 0d 0d 0d | 0d 76 6f 69 64 20 42 6f |);..}...|.void Bo|
|00003f80| 6f 74 73 74 72 61 70 28 | 29 0d 09 7b 0d 09 49 6e |otstrap(|)..{..In|
|00003f90| 69 74 56 61 72 73 28 29 | 3b 0d 0d 2f 2a 2a 2a 20 |itVars()|;../*** |
|00003fa0| 46 69 6c 65 20 4d 65 6e | 75 20 2a 2a 2a 2f 0d 09 |File Men|u ***/..|
|00003fb0| 49 6e 73 74 61 6c 6c 4d | 65 6e 75 28 22 5c 70 46 |InstallM|enu("\pF|
|00003fc0| 69 6c 65 22 2c 6e 69 6c | 2c 30 29 3b 0d 09 49 6e |ile",nil|,0);..In|
|00003fd0| 73 74 61 6c 6c 4d 65 6e | 75 49 74 65 6d 28 22 5c |stallMen|uItem("\|
|00003fe0| 70 51 75 69 74 2f 51 22 | 2c 4c 65 74 73 51 75 69 |pQuit/Q"|,LetsQui|
|00003ff0| 74 2c 30 29 3b 0d 09 49 | 6e 73 74 61 6c 6c 4d 65 |t,0);..I|nstallMe|
|00004000| 6e 75 49 74 65 6d 28 22 | 5c 70 28 2d 22 2c 6e 69 |nuItem("|\p(-",ni|
|00004010| 6c 2c 30 29 3b 0d 09 49 | 6e 73 74 61 6c 6c 4d 65 |l,0);..I|nstallMe|
|00004020| 6e 75 49 74 65 6d 28 22 | 5c 70 50 6c 61 79 20 53 |nuItem("|\pPlay S|
|00004030| 6f 6d 65 20 4e 6f 74 65 | 73 2f 31 22 2c 50 6c 61 |ome Note|s/1",Pla|
|00004040| 79 53 6f 6d 65 4e 6f 74 | 65 73 2c 30 29 3b 0d 09 |ySomeNot|es,0);..|
|00004050| 49 6e 73 74 61 6c 6c 4d | 65 6e 75 49 74 65 6d 28 |InstallM|enuItem(|
|00004060| 22 5c 70 50 6c 61 79 20 | 53 68 65 70 61 72 64 20 |"\pPlay |Shepard |
|00004070| 4d 65 6c 6f 64 79 2f c1 | 22 2c 50 6c 61 79 53 68 |Melody/.|",PlaySh|
|00004080| 65 70 61 72 64 4d 65 6c | 6f 64 79 2c 30 29 3b 0d |epardMel|ody,0);.|
|00004090| 09 49 6e 73 74 61 6c 6c | 4d 65 6e 75 49 74 65 6d |.Install|MenuItem|
|000040a0| 28 22 5c 70 50 69 63 6b | 20 54 68 65 6e 20 50 6c |("\pPick| Then Pl|
|000040b0| 61 79 20 53 6f 6d 65 20 | 4e 6f 74 65 73 2f 32 22 |ay Some |Notes/2"|
|000040c0| 2c 50 69 63 6b 54 68 65 | 6e 50 6c 61 79 53 6f 6d |,PickThe|nPlaySom|
|000040d0| 65 4e 6f 74 65 73 2c 30 | 29 3b 0d 09 49 6e 73 74 |eNotes,0|);..Inst|
|000040e0| 61 6c 6c 4d 65 6e 75 49 | 74 65 6d 28 22 5c 70 50 |allMenuI|tem("\pP|
|000040f0| 6c 61 79 20 53 6f 6d 65 | 20 42 65 6e 74 20 4e 6f |lay Some| Bent No|
|00004100| 74 65 73 2f 33 22 2c 50 | 6c 61 79 53 6f 6d 65 42 |tes/3",P|laySomeB|
|00004110| 65 6e 74 4e 6f 74 65 73 | 2c 30 29 3b 0d 09 49 6e |entNotes|,0);..In|
|00004120| 73 74 61 6c 6c 4d 65 6e | 75 49 74 65 6d 28 22 5c |stallMen|uItem("\|
|00004130| 70 42 75 69 6c 64 20 41 | 6e 64 20 50 6c 61 79 20 |pBuild A|nd Play |
|00004140| 53 65 71 75 65 6e 63 65 | 2f 34 22 2c 42 75 69 6c |Sequence|/4",Buil|
|00004150| 64 53 65 71 75 65 6e 63 | 65 41 6e 64 50 6c 61 79 |dSequenc|eAndPlay|
|00004160| 2c 30 29 3b 0d 09 49 6e | 73 74 61 6c 6c 4d 65 6e |,0);..In|stallMen|
|00004170| 75 49 74 65 6d 28 22 5c | 70 42 75 69 6c 64 20 4d |uItem("\|pBuild M|
|00004180| 75 73 69 63 20 4d 6f 76 | 69 65 2f 35 22 2c 42 75 |usic Mov|ie/5",Bu|
|00004190| 69 6c 64 4d 75 73 69 63 | 4d 6f 76 69 65 2c 30 29 |ildMusic|Movie,0)|
|000041a0| 3b 0d 09 49 6e 73 74 61 | 6c 6c 4d 65 6e 75 49 74 |;..Insta|llMenuIt|
|000041b0| 65 6d 28 22 5c 70 55 73 | 65 20 4d 49 44 49 20 49 |em("\pUs|e MIDI I|
|000041c0| 6e 70 75 74 2f 36 22 2c | 55 73 65 4d 49 44 49 49 |nput/6",|UseMIDII|
|000041d0| 6e 70 75 74 2c 30 29 3b | 0d 2f 2a 2a 2a 20 45 64 |nput,0);|./*** Ed|
|000041e0| 69 74 20 4d 65 6e 75 20 | 2a 2a 2a 2f 0d 09 49 6e |it Menu |***/..In|
|000041f0| 73 74 61 6c 6c 45 64 69 | 74 4d 65 6e 75 28 6e 69 |stallEdi|tMenu(ni|
|00004200| 6c 2c 6e 69 6c 2c 6e 69 | 6c 2c 6e 69 6c 2c 6e 69 |l,nil,ni|l,nil,ni|
|00004210| 6c 29 3b 0d 0d 09 4f 70 | 65 6e 57 69 6e 64 6f 77 |l);...Op|enWindow|
|00004220| 28 30 2c 30 2c 30 29 3b | 0d 09 7d 0d 0d 76 6f 69 |(0,0,0);|..}..voi|
|00004230| 64 20 48 61 74 73 74 72 | 61 70 28 29 0d 2f 2a 0d |d Hatstr|ap()./*.|
|00004240| 20 20 2a 20 63 6c 65 61 | 6e 20 75 70 0d 20 20 2a | * clea|n up. *|
|00004250| 2f 0d 09 7b 0d 09 7d 0d | 0d 00 00 00 00 00 00 00 |/..{..}.|........|
|00004260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004280| 00 00 01 00 00 00 01 72 | 00 00 00 72 00 00 00 5a |.......r|...r...Z|
|00004290| 72 33 31 20 63 3b 0d 09 | 6c 6f 6e 67 20 78 3b 09 |r31 c;..|long x;.|
|000042a0| 09 2f 2a 20 54 68 69 73 | 20 73 68 6f 75 6c 64 20 |./* This| should |
|000042b0| 0f 51 54 4d 41 44 65 76 | 65 6c 6f 70 39 35 2e 63 |.QTMADev|elop95.c|
|000042c0| 02 00 00 00 54 45 58 54 | 4b 41 48 4c 01 00 00 d0 |....TEXT|KAHL....|
|000042d0| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 d0 00 40 |..TEXTKA|HL.....@|
|000042e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042f0| 00 00 ac 1d ae 55 00 00 | 41 d9 00 00 01 cc 43 6f |.....U..|A.....Co|
|00004300| 6e 63 61 74 65 6e 61 74 | 65 50 53 74 72 69 6e 67 |ncatenat|ePString|
|00004310| 73 28 73 2c 22 5c 70 2d | 22 29 3b 0d 09 09 6e 20 |s(s,"\p-|");...n |
|00004320| 3d 20 2d 6e 3b 0d 09 09 | 69 66 28 6e 20 3c 20 30 |= -n;...|if(n < 0|
|00004330| 29 0d 09 09 09 6e 2d 2d | 3b 09 09 2f 2a 20 70 69 |)....n--|;../* pi|
|00004340| 6e 20 6d 6f 73 74 20 6e | 65 67 61 74 69 76 65 20 |n most n|egative |
|00004350| 2a 2f 0d 09 09 7d 0d 0d | 09 41 6e 79 42 61 73 65 |*/...}..|.AnyBase|
|00004360| 54 6f 50 53 74 72 69 6e | 67 28 6e 3e 3e 70 2c 31 |ToPStrin|g(n>>p,1|
|00004370| 30 2c 30 2c 63 29 3b 0d | 09 43 6f 6e 63 61 74 65 |0,0,c);.|.Concate|
|00004380| 00 00 00 1a 00 01 00 18 | 00 00 08 95 00 60 01 18 |........|.....`..|
|00004390| 0e f8 00 00 09 74 68 69 | 73 45 72 72 6f 72 00 00 |.....thi|sError..|
|000043a0| 00 48 00 09 4d 6f 6e 61 | 63 6f 00 00 00 00 00 00 |.H..Mona|co......|
|000043b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043c0| 00 00 00 00 00 03 00 04 | 00 3d 00 03 01 e6 02 5e |........|.=.....^|
|000043d0| 00 3d 00 03 01 e6 02 5e | ac 96 df de 00 00 32 3a |.=.....^|......2:|
|000043e0| 00 00 32 3a 00 00 30 20 | 00 00 00 00 00 04 00 01 |..2:..0 |........|
|000043f0| 00 01 00 00 01 00 00 00 | 01 72 00 00 00 72 00 00 |........|.r...r..|
|00004400| 00 5a 01 21 3a 3c 29 de | 00 00 00 1c 00 5a 00 02 |.Z.!:<).|.....Z..|
|00004410| 44 54 56 55 00 00 00 1a | 4d 50 53 52 00 00 00 26 |DTVU....|MPSR...&|
|00004420| 4d 57 42 42 00 00 00 32 | 1d 8e ff ff 00 00 00 00 |MWBB...2|........|
|00004430| 00 00 00 00 03 ed ff ff | 00 00 00 1e 00 00 00 00 |........|........|
|00004440| 03 f0 ff ff 00 00 00 6a | 00 00 00 00 00 00 00 00 |.......j|........|
|00004450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+